mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-12-03 05:41:52 +09:00
array_get : return null instead of an empty string
This commit is contained in:
1 parent
4d9fde7b04
commit
d0a4e9e7e8
1 file changed
+2
-1
+2
-1
@@ -423,7 +423,8 @@ $di['translate'] = $di->protect(function ($textDomain = '') use ($di) {
|
||||
});
|
||||
|
||||
$di['array_get'] = $di->protect(function (array $array, $key, $default = null) {
|
||||
return array_key_exists($key, $array) ? $array[$key] : $default;
|
||||
$result = array_key_exists($key, $array) ? $array[$key] : $default;
|
||||
return ($result === '') ? null : $result;
|
||||
});
|
||||
|
||||
return $di;
|
||||
Reference in new issue
Block a user