* Compatible php5.3.
This commit is contained in:
@@ -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');
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user