FIX #yogosha9089

This commit is contained in:
Laurent Destailleur 2022-02-25 01:49:38 +01:00
parent 8c61a29051
commit c097ee5331

View File

@ -647,6 +647,11 @@ function checkPHPCode($phpfullcodestringold, $phpfullcodestring)
break;
}
}
// Check dynamic functions $xxx(
if (preg_match('/\$[a-z0-9_]+\(/ims', $phpfullcodestring)) {
$error++;
setEventMessages($langs->trans("DynamicPHPCodeContainsAForbiddenInstruction", '$...('), null, 'errors');
}
if (!$error && empty($user->rights->website->writephp)) {
if ($phpfullcodestringold != $phpfullcodestring) {