Значение по умолчанию, если нет значения
This commit is contained in:
parent
d4694542ea
commit
46e170055b
1 changed files with 2 additions and 2 deletions
|
|
@ -49,9 +49,9 @@ class Klein {
|
|||
$result = $arr;
|
||||
foreach ($items as $key) {
|
||||
if (is_array($result)) {
|
||||
$result = $result[$key];
|
||||
$result = isset($result[$key]) ? $result[$key] : null;
|
||||
} else {
|
||||
$result = $result->{$key};
|
||||
$result = isset($result->{$key}) ? $result->{$key} : null;
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue