Always return BaseObject in Value::validate() #2444

This commit is contained in:
Kijin Sung 2024-12-10 22:34:16 +09:00
parent 5a107c58fc
commit 4be2d59b69

View file

@ -233,9 +233,9 @@ class Value
*
* @param mixed $value
* @param mixed $old_value
* @return ?BaseObject
* @return BaseObject
*/
public function validate($value, $old_value = null): ?BaseObject
public function validate($value, $old_value = null): BaseObject
{
// Take legacy encoding into consideration.
if (is_array($value))
@ -295,7 +295,7 @@ class Value
}
}
return null;
return new BaseObject;
}
/**