修复 某些情况下PHP7.1的兼容性

This commit is contained in:
Comsenz 2017-11-07 09:57:42 +08:00
parent a0b88619b7
commit 439460810e
1 changed files with 4 additions and 1 deletions

View File

@ -184,8 +184,11 @@ function updatepluginlanguage($pluginarray) {
}
foreach(array('script', 'template', 'install', 'system') as $type) {
loadcache('pluginlanguage_'.$type, 1);
if(empty($_G['cache']['pluginlanguage_'.$type])) {
$_G['cache']['pluginlanguage_'.$type] = array();
}
if($type != 'system') {
if(!empty($pluginarray['language'][$type.'lang'])) {
if(!empty($pluginarray['language'][$type.'lang'])) {
$_G['cache']['pluginlanguage_'.$type][$pluginarray['plugin']['identifier']] = $pluginarray['language'][$type.'lang'];
}
} else {