mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 16:51:40 +09:00
Always return BaseObject in Value::validate() #2444
This commit is contained in:
parent
5a107c58fc
commit
4be2d59b69
1 changed files with 3 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue