Upgrade to 3.2.0
This commit is contained in:
@@ -3,19 +3,19 @@
|
||||
namespace Kirby\Toolkit;
|
||||
|
||||
use Exception;
|
||||
use Kirby\Image\Image;
|
||||
use Kirby\Toolkit\Str;
|
||||
use ReflectionFunction;
|
||||
use Throwable;
|
||||
|
||||
/**
|
||||
* A set of validator methods
|
||||
*
|
||||
* @package Kirby Toolkit
|
||||
* @author Bastian Allgeier <bastian@getkirby.com>
|
||||
* @link http://getkirby.com
|
||||
* @copyright Bastian Allgeier
|
||||
* @license MIT
|
||||
*/
|
||||
* A set of validator methods
|
||||
*
|
||||
* @package Kirby Toolkit
|
||||
* @author Bastian Allgeier <bastian@getkirby.com>
|
||||
* @link https://getkirby.com
|
||||
* @copyright Bastian Allgeier GmbH
|
||||
* @license https://opensource.org/licenses/MIT
|
||||
*/
|
||||
class V
|
||||
{
|
||||
|
||||
@@ -66,17 +66,20 @@ class V
|
||||
$reflection = new ReflectionFunction($validator);
|
||||
$arguments = [];
|
||||
|
||||
|
||||
foreach ($reflection->getParameters() as $index => $parameter) {
|
||||
$value = $params[$index] ?? null;
|
||||
|
||||
if (is_array($value) === true) {
|
||||
foreach ($value as $index => $item) {
|
||||
if (is_array($item) === true) {
|
||||
$value[$index] = implode('|', $item);
|
||||
try {
|
||||
foreach ($value as $index => $item) {
|
||||
if (is_array($item) === true) {
|
||||
$value[$index] = implode('|', $item);
|
||||
}
|
||||
}
|
||||
$value = implode(', ', $value);
|
||||
} catch (Throwable $e) {
|
||||
$value = '-';
|
||||
}
|
||||
$value = implode(', ', $value);
|
||||
}
|
||||
|
||||
$arguments[$parameter->getName()] = $value;
|
||||
|
Reference in New Issue
Block a user