mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-17 23:11:29 +01:00
Fix warning
This commit is contained in:
@@ -10851,12 +10851,16 @@ function verifCond($strToEvaluate, $onlysimplestring = '1')
|
|||||||
* @param string $onlysimplestring '0' (deprecated, do not use it anymore)=Accept all chars,
|
* @param string $onlysimplestring '0' (deprecated, do not use it anymore)=Accept all chars,
|
||||||
* '1' (most common use)=Accept only simple string with char 'a-z0-9\s^$_+-.*>&|=!?():"\',/@';',
|
* '1' (most common use)=Accept only simple string with char 'a-z0-9\s^$_+-.*>&|=!?():"\',/@';',
|
||||||
* '2' (used for example for the compute property of extrafields)=Accept also '<[]'
|
* '2' (used for example for the compute property of extrafields)=Accept also '<[]'
|
||||||
* @return void|string Nothing or return result of eval (even if type can be int, it is safer to assume string and find all potential typing issues as abs(dol_eval(...)).
|
* @return string Return result of eval (even if type can be int, it is safer to assume string and find all potential typing issues as abs(dol_eval(...)).
|
||||||
* @see verifCond(), checkPHPCode() to see sanitizing rules that should be very close.
|
* @see verifCond(), checkPHPCode() to see sanitizing rules that should be very close.
|
||||||
* @phan-suppress PhanPluginUnsafeEval
|
* @phan-suppress PhanPluginUnsafeEval
|
||||||
*/
|
*/
|
||||||
function dol_eval($s, $returnvalue = 1, $hideerrors = 1, $onlysimplestring = '1')
|
function dol_eval($s, $returnvalue = 1, $hideerrors = 1, $onlysimplestring = '1')
|
||||||
{
|
{
|
||||||
|
if ($returnvalue != 1) {
|
||||||
|
dol_syslog("Use of dol_eval with parameter returnvalue = 0 is now forbidden. Please fix this", LOG_ERR);
|
||||||
|
}
|
||||||
|
|
||||||
if (getDolGlobalString("MAIN_USE_DOL_EVAL_NEW")) {
|
if (getDolGlobalString("MAIN_USE_DOL_EVAL_NEW")) {
|
||||||
return dol_eval_new($s);
|
return dol_eval_new($s);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user