mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Making modParams work with non-array values.
All but true, false, null will replace the parameter now. This allows modification of string and object parameters.
This commit is contained in:
parent
c5c2859800
commit
39b1203e9a
1 changed files with 1 additions and 2 deletions
|
@ -117,7 +117,7 @@ abstract class ObjectCollection {
|
||||||
(is_array($options['breakOn']) && in_array($result, $options['breakOn'], true)))
|
(is_array($options['breakOn']) && in_array($result, $options['breakOn'], true)))
|
||||||
) {
|
) {
|
||||||
return $result;
|
return $result;
|
||||||
} elseif ($options['modParams'] !== false && is_array($result)) {
|
} elseif ($options['modParams'] !== false && !in_array($result, array(true, false, null), true)) {
|
||||||
$params[$options['modParams']] = $result;
|
$params[$options['modParams']] = $result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -303,5 +303,4 @@ abstract class ObjectCollection {
|
||||||
}
|
}
|
||||||
return $normal;
|
return $normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue