From d32acea80c906c3509cdb6abc92c95f0d6405062 Mon Sep 17 00:00:00 2001 From: Cameron Date: Fri, 13 Jan 2017 10:34:03 -0800 Subject: [PATCH] Fix for PHP 7.1 installation issue. --- e107_handlers/model_class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/e107_handlers/model_class.php b/e107_handlers/model_class.php index 7f03ab440..3b98e82f0 100644 --- a/e107_handlers/model_class.php +++ b/e107_handlers/model_class.php @@ -1097,12 +1097,14 @@ class e_model extends e_object $data = &$this->{$data_src}; for ($i = 0, $l = count($keyArr); $i < $l; $i++) { + $k = $keyArr[$i]; - if (!isset($data[$k])) + if (!isset($data[$k]) || empty($data[$k])) // PHP7.1 fix. Reset to empty array() if $data[$k] is an empty string. Reason for empty string still unknown. { $data[$k] = array(); } + $data = &$data[$k]; }