Skip to content

Commit

Permalink
Makes sure the validation exists before checking for array. Fixes #663
Browse files Browse the repository at this point in the history
  • Loading branch information
Arul- committed Aug 18, 2021
1 parent 1c2fa5b commit 777b00b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Defaults.php
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ class Defaults
public static function setProperty($name, $value)
{
if (!property_exists(__CLASS__, $name)) return false;
if (@is_array(Defaults::$validation[$name])) {
if (isset(Defaults::$validation[$name]) && is_array(Defaults::$validation[$name])) {
$info = new ValidationInfo(Defaults::$validation[$name]);
$value = Validator::validate($value, $info);
}
Expand Down

0 comments on commit 777b00b

Please sign in to comment.