mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-11 12:01:23 +01:00
Fix warnings
This commit is contained in:
@@ -9362,7 +9362,7 @@ function dol_eval($s, $returnvalue = 0, $hideerrors = 1, $onlysimplestring = '1'
|
|||||||
} catch (Error $e) {
|
} catch (Error $e) {
|
||||||
$error = 'dol_eval try/catch error : ';
|
$error = 'dol_eval try/catch error : ';
|
||||||
$error .= $e->getMessage();
|
$error .= $e->getMessage();
|
||||||
dol_syslog($error);
|
dol_syslog($error, LOG_WARNING);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1031,7 +1031,8 @@ class SecurityTest extends PHPUnit\Framework\TestCase
|
|||||||
print "result18 = ".$result."\n";
|
print "result18 = ".$result."\n";
|
||||||
$this->assertFalse($result);
|
$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";
|
print "result19 = ".$result."\n";
|
||||||
$this->assertStringContainsString('Bad string syntax to evaluate', $result);
|
$this->assertStringContainsString('Bad string syntax to evaluate', $result);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user