From f468c61df33f70d4912a25586617fc586a598413 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 12 Oct 2020 14:04:34 +0200 Subject: [PATCH] Fix More powerfull detection of bad use of newToken --- test/phpunit/CodingPhpTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/phpunit/CodingPhpTest.php b/test/phpunit/CodingPhpTest.php index b819671578c..4326f536f92 100644 --- a/test/phpunit/CodingPhpTest.php +++ b/test/phpunit/CodingPhpTest.php @@ -341,7 +341,7 @@ class CodingPhpTest extends PHPUnit\Framework\TestCase $ok=true; $matches=array(); // Check string name="token" value="'.$_SESSINON - preg_match_all('/name="token" value="\'\.\$_SESSION/', $filecontent, $matches, PREG_SET_ORDER); + preg_match_all('/name="token" value="\'\s*\.\s*\$_SESSION/', $filecontent, $matches, PREG_SET_ORDER); foreach ($matches as $key => $val) { if ($file['name'] != 'excludefile.php')