mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 03:29:20 +03:00
No need to check 'disable_functions',
function_exists/is_callable do that.
This commit is contained in:
parent
361e991aea
commit
22e858f905
1 changed files with 3 additions and 16 deletions
|
|
@ -1340,8 +1340,6 @@ END;
|
|||
|
||||
public static function FunctionExistsAndEnabled($mFunctionNameOrNames) : bool
|
||||
{
|
||||
static $aCache = null;
|
||||
|
||||
if (\is_array($mFunctionNameOrNames))
|
||||
{
|
||||
foreach ($mFunctionNameOrNames as $sFunctionName)
|
||||
|
|
@ -1355,20 +1353,9 @@ END;
|
|||
return true;
|
||||
}
|
||||
|
||||
if (empty($mFunctionNameOrNames) || !\function_exists($mFunctionNameOrNames) || !\is_callable($mFunctionNameOrNames))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (null === $aCache)
|
||||
{
|
||||
$sDisableFunctions = \ini_get('disable_functions');
|
||||
$sDisableFunctions = \is_string($sDisableFunctions) ? $sDisableFunctions : '';
|
||||
|
||||
$aCache = \explode(',', $sDisableFunctions);
|
||||
}
|
||||
|
||||
return !\in_array($mFunctionNameOrNames, $aCache);
|
||||
return !empty($mFunctionNameOrNames)
|
||||
&& \function_exists($mFunctionNameOrNames)
|
||||
&& !\is_callable($mFunctionNameOrNames);
|
||||
}
|
||||
|
||||
public static function ClearNullBite($mValue) : string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue