From 46e170055befb77d096e89b01d9d24ac1bb6d041 Mon Sep 17 00:00:00 2001 From: origami11 Date: Fri, 31 Mar 2017 18:04:03 +0300 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=BD=D0=B0=D1=87=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=BF=D0=BE=20=D1=83=D0=BC=D0=BE=D0=BB=D1=87=D0=B0?= =?UTF-8?q?=D0=BD=D0=B8=D1=8E,=20=D0=B5=D1=81=D0=BB=D0=B8=20=D0=BD=D0=B5?= =?UTF-8?q?=D1=82=20=D0=B7=D0=BD=D0=B0=D1=87=D0=B5=D0=BD=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Klein.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Klein.php b/Klein.php index ebe1601..12167d1 100644 --- a/Klein.php +++ b/Klein.php @@ -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;