1
0
Fork 0

Remove too strict parameter check in defaults()

This commit is contained in:
Hypolite Petovan 2018-01-03 21:24:09 -05:00
parent 929c6de5f2
commit 2a09af8bd0

View file

@ -595,9 +595,6 @@ function defaults() {
if (count($args) > 3) {
throw new BadFunctionCallException('defaults() cannot use more than 3 parameters');
}
if (count($args) === 3 && !is_array($args[0])) {
throw new BadFunctionCallException('defaults($arr, $key, $def) requires an array as first parameter');
}
if (count($args) === 3 && is_null($args[1])) {
throw new BadFunctionCallException('defaults($arr, $key, $def) $key is null');
}