* Compatible php5.3.

This commit is contained in:
liyuchun
2021-11-08 11:05:09 +08:00
parent 4f6739980e
commit ce439b9061
2 changed files with 5 additions and 7 deletions
+2 -4
View File
@@ -48,9 +48,7 @@ class docModel extends model
->andWhere('type')->eq('api')
->orderBy('id_desc')
->fetchAll('id');
$libs = array_filter($libs, function ($value) {
return $this->checkPrivLib($value);
});
$libs = array_filter($libs, array($this, 'checkPrivLib'));
return $libs;
}
@@ -2453,7 +2451,7 @@ EOT;
if(!isset($treeMenu[$module->parent])) $treeMenu[$module->parent] = '';
$class = ['catalog'];
$class = array('catalog');
if($treeMenu[$module->id])
{
array_push($class, 'closed');
+3 -3
View File
@@ -995,9 +995,9 @@ class gitlabModel extends model
{
$type = zget($body, 'object_kind', '');
if(!$type or !is_callable(array($this, "webhookParse{$type}"))) return false;
// fix php 8.0 bug. link: https://www.php.net/manual/zh/function.call-user-func-array.php#125953
//return call_user_func_array(array($this, "webhookParse{$type}"), array('body' => $body, $gitlabID));
return call_user_func_array(array($this, "webhookParse{$type}"), [$body, $gitlabID]);
/* fix php 8.0 bug. link: https://www.php.net/manual/zh/function.call-user-func-array.php#125953. */
return call_user_func_array(array($this, "webhookParse{$type}"), array($body, $gitlabID));
}
/**