forked from Wavyzz/dolibarr
FIX #yogosha8272
This commit is contained in:
@@ -473,6 +473,19 @@ class CodingPhpTest extends PHPUnit\Framework\TestCase
|
||||
$this->assertTrue($ok, 'Found a forbidden string sequence into '.$file['relativename'].' : name="token" value="\'.$_SESSION[..., you must use a newToken() instead of $_SESSION[\'newtoken\'].');
|
||||
|
||||
|
||||
// Test we don't have @var array(
|
||||
$ok=true;
|
||||
$matches=array();
|
||||
preg_match_all('/preg_grep\(.*\$/', $filecontent, $matches, PREG_SET_ORDER);
|
||||
foreach ($matches as $key => $val) {
|
||||
if (strpos($val[0], 'preg_quote') === false) {
|
||||
$ok=false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$this->assertTrue($ok, 'Found a preg_grep with a param that is a $var but without preg_quote in file '.$file['relativename'].'.');
|
||||
|
||||
|
||||
// Test we don't have @var array(
|
||||
$ok=true;
|
||||
$matches=array();
|
||||
|
||||
Reference in New Issue
Block a user