From 8ae78a33ff6869ee8fd248349f18022becededa6 Mon Sep 17 00:00:00 2001 From: hansemschnokeloch Date: Tue, 27 Aug 2024 06:51:12 +0200 Subject: [PATCH] Fix 30695 (#30697) --- htdocs/admin/system/security.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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"');