mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-07 00:17:03 +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
|
public static function FunctionExistsAndEnabled($mFunctionNameOrNames) : bool
|
||||||
{
|
{
|
||||||
static $aCache = null;
|
|
||||||
|
|
||||||
if (\is_array($mFunctionNameOrNames))
|
if (\is_array($mFunctionNameOrNames))
|
||||||
{
|
{
|
||||||
foreach ($mFunctionNameOrNames as $sFunctionName)
|
foreach ($mFunctionNameOrNames as $sFunctionName)
|
||||||
|
|
@ -1355,20 +1353,9 @@ END;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($mFunctionNameOrNames) || !\function_exists($mFunctionNameOrNames) || !\is_callable($mFunctionNameOrNames))
|
return !empty($mFunctionNameOrNames)
|
||||||
{
|
&& \function_exists($mFunctionNameOrNames)
|
||||||
return false;
|
&& !\is_callable($mFunctionNameOrNames);
|
||||||
}
|
|
||||||
|
|
||||||
if (null === $aCache)
|
|
||||||
{
|
|
||||||
$sDisableFunctions = \ini_get('disable_functions');
|
|
||||||
$sDisableFunctions = \is_string($sDisableFunctions) ? $sDisableFunctions : '';
|
|
||||||
|
|
||||||
$aCache = \explode(',', $sDisableFunctions);
|
|
||||||
}
|
|
||||||
|
|
||||||
return !\in_array($mFunctionNameOrNames, $aCache);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function ClearNullBite($mValue) : string
|
public static function ClearNullBite($mValue) : string
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue