From acbdd756cd2a8772b4d0ebfc3ede86e71c6a495a Mon Sep 17 00:00:00 2001 From: plegall Date: Thu, 10 Dec 2015 17:27:21 +0100 Subject: bug #385 PHP7 compatibility * array concatenation no longer seem to work --- admin/include/updates.class.php | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/admin/include/updates.class.php b/admin/include/updates.class.php index 17a3b2578..29cefdfdb 100644 --- a/admin/include/updates.class.php +++ b/admin/include/updates.class.php @@ -135,15 +135,33 @@ class updates { return false; } + + $servers = array(); + foreach ($pem_exts as $ext) { if (isset($ext_to_check[$ext['extension_id']])) { - $server = 'server_'.$ext_to_check[$ext['extension_id']]; - $this->$ext_to_check[$ext['extension_id']]->$server += array($ext['extension_id'] => $ext); + $type = $ext_to_check[$ext['extension_id']]; + + if (!isset($servers[$type])) + { + $servers[$type] = array(); + } + + $servers[$type][ $ext['extension_id'] ] = $ext; + unset($ext_to_check[$ext['extension_id']]); } } + + foreach ($servers as $server_type => $extension_list) + { + $server_string = 'server_'.$server_type; + + $this->$server_type->$server_string = $extension_list; + } + $this->check_missing_extensions($ext_to_check); return true; } -- cgit v1.2.3