|
@@ -814,6 +814,8 @@ class Validator implements ArrayAccess, IteratorAggregate, Countable
|
|
|
is_callable($second)
|
|
is_callable($second)
|
|
|
) && (
|
|
) && (
|
|
|
is_string($first) || $first === null
|
|
is_string($first) || $first === null
|
|
|
|
|
+ ) && (
|
|
|
|
|
+ $first !== 'create' && $first !== 'update'
|
|
|
)
|
|
)
|
|
|
) {
|
|
) {
|
|
|
return [$first, $second];
|
|
return [$first, $second];
|
|
@@ -824,6 +826,11 @@ class Validator implements ArrayAccess, IteratorAggregate, Countable
|
|
|
"so that they are `message, when`."
|
|
"so that they are `message, when`."
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
|
|
+ // Called without the second argument.
|
|
|
|
|
+ if (is_bool($second)) {
|
|
|
|
|
+ $second = null;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// Called with `$when, $message`. Reverse the
|
|
// Called with `$when, $message`. Reverse the
|
|
|
// order to match the expected return value.
|
|
// order to match the expected return value.
|
|
|
return [$second, $first];
|
|
return [$second, $first];
|