diff options
author | plegall <plg@piwigo.org> | 2015-12-10 17:27:21 +0100 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2015-12-10 17:27:21 +0100 |
commit | acbdd756cd2a8772b4d0ebfc3ede86e71c6a495a (patch) | |
tree | 6f8731d1209b5d5bd553c6b58027223f2ca46ad3 | |
parent | ed8db3da2787d8068f18e0ddc806294f759b8010 (diff) |
bug #385 PHP7 compatibility
* array concatenation no longer seem to work
Diffstat (limited to '')
-rw-r--r-- | admin/include/updates.class.php | 22 |
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;
}
|