| @@ 329-335 (lines=7) @@ | ||
| 326 | return call_user_func_array($condition, $arguments); |
|
| 327 | } catch (\ErrorException $exception) { |
|
| 328 | $condition = func_get_arg(2); |
|
| 329 | if (is_array($condition)) { |
|
| 330 | if (is_object($condition[0])) { |
|
| 331 | $condition[0] = get_class($condition[0]); |
|
| 332 | } |
|
| 333 | ||
| 334 | $condition = join('::', $condition); |
|
| 335 | } |
|
| 336 | ||
| 337 | $this->logger()->error( |
|
| 338 | "Condition '{condition}' failed with '{exception}' while checking '{field}' field.", |
|
| @@ 409-415 (lines=7) @@ | ||
| 406 | */ |
|
| 407 | private function addMessage($field, $message, $condition, array $arguments = []) |
|
| 408 | { |
|
| 409 | if (is_array($condition)) { |
|
| 410 | if (is_object($condition[0])) { |
|
| 411 | $condition[0] = get_class($condition[0]); |
|
| 412 | } |
|
| 413 | ||
| 414 | $condition = join('::', $condition); |
|
| 415 | } |
|
| 416 | ||
| 417 | $this->errors[$field] = \Spiral\interpolate( |
|
| 418 | $message, |
|