Fix warnings

This commit is contained in:
Laurent Destailleur
2023-09-10 15:23:32 +02:00
parent ad9e11542c
commit b2ae9ea888
2 changed files with 3 additions and 2 deletions

View File

@@ -9362,7 +9362,7 @@ function dol_eval($s, $returnvalue = 0, $hideerrors = 1, $onlysimplestring = '1'
} catch (Error $e) {
$error = 'dol_eval try/catch error : ';
$error .= $e->getMessage();
dol_syslog($error);
dol_syslog($error, LOG_WARNING);
}
}

View File

@@ -1031,7 +1031,8 @@ class SecurityTest extends PHPUnit\Framework\TestCase
print "result18 = ".$result."\n";
$this->assertFalse($result);
$result = (string) dol_eval("(\$a.'aa')", 1, 0);
$a='ab';
$result = (string) dol_eval("(\$a.'s')", 1, 0);
print "result19 = ".$result."\n";
$this->assertStringContainsString('Bad string syntax to evaluate', $result);