FIX: array_walk returns bool and tertiary operator
This commit is contained in:
@ -133,9 +133,10 @@ abstract class Model extends BaseModel implements ModelInterface {
|
||||
$obj = static::find($factory, $input);
|
||||
} else {
|
||||
$where = $data;
|
||||
$where = array_values(array_walk($where, function(&$item, $key) {
|
||||
array_walk($where, function(&$item, $key) {
|
||||
$item = [$key, $item];
|
||||
}));
|
||||
});
|
||||
$where = array_values($where);
|
||||
$obj = $factory->find($class)->where($where)->one();
|
||||
}
|
||||
if ($obj === null) {
|
||||
|
Reference in New Issue
Block a user