Revision ab3b2273
Added by Reid Linnemann almost 3 years ago
src/etc/inc/util.inc | ||
---|---|---|
3365 | 3365 |
} |
3366 | 3366 |
} |
3367 | 3367 |
|
3368 |
if (($default != null) && empty($el)) { |
|
3368 |
if (($default !== null) && empty($el)) {
|
|
3369 | 3369 |
return ($default); |
3370 | 3370 |
} |
3371 | 3371 |
|
Also available in: Unified diff
Fix array_get_path() not returning $default for null-like values. #13446
In array_get_path(), a $default provided that is not null is intended to invoke
alternate behavior where if the path exists and is empty, $default should be
returned. This requires not identical compare as opposed to a not equal compare,
as some empty values such as [] are considered equal to null.