aboutsummaryrefslogtreecommitdiffstats
path: root/admin/include
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2015-12-10 17:27:21 +0100
committerplegall <plg@piwigo.org>2015-12-10 17:27:21 +0100
commitacbdd756cd2a8772b4d0ebfc3ede86e71c6a495a (patch)
tree6f8731d1209b5d5bd553c6b58027223f2ca46ad3 /admin/include
parented8db3da2787d8068f18e0ddc806294f759b8010 (diff)
bug #385 PHP7 compatibility
* array concatenation no longer seem to work
Diffstat (limited to 'admin/include')
-rw-r--r--admin/include/updates.class.php22
1 files 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;
}