diff --git a/htdocs/admin/system/security.php b/htdocs/admin/system/security.php index 886e7b11bac..279f85becae 100644 --- a/htdocs/admin/system/security.php +++ b/htdocs/admin/system/security.php @@ -155,7 +155,7 @@ print "
\n"; $todisabletext = ''; $i = 0; foreach ($arrayoffunctionstodisable as $functiontodisable) { - if (! in_array($functiontodisable, $arrayoffunctionsdisabled)) { + if (\function_exists($functiontodisable)) { if ($i > 0) { $todisabletext .= ', '; } @@ -170,7 +170,7 @@ if ($todisabletext) { $todisabletext = ''; $i = 0; foreach ($arrayoffunctionstodisable2 as $functiontodisable) { - if (! in_array($functiontodisable, $arrayoffunctionsdisabled)) { + if (\function_exists($functiontodisable)) { if ($i > 0) { $todisabletext .= ', '; } @@ -182,8 +182,7 @@ if ($todisabletext) { print img_picto('', 'warning', 'class="pictofixedwidth"').$langs->trans("IfCLINotRequiredYouShouldDisablePHPFunctions").': '.$todisabletext; print '
'; } - -if (in_array($functiontokeep, $arrayoffunctionsdisabled)) { +if (!\function_exists($functiontokeep)) { print img_picto($langs->trans("PHPFunctionsRequiredForCLI"), 'warning', 'class="pictofixedwidth"'); } else { print img_picto('', 'tick', 'class="pictofixedwidth"');