2
0
forked from Wavyzz/dolibarr

Fix test on permissions

This commit is contained in:
Laurent Destailleur
2024-09-06 17:36:50 +02:00
parent 0f979a31f3
commit 77a76aad7a
8 changed files with 17 additions and 16 deletions

View File

@@ -662,7 +662,7 @@ class CodingPhpTest extends CommonClassTest
$filecontentaction = $filecontent;
}
preg_match_all('/if.*\$action\s*==\s*[\'"][a-z\-]+[\'"].*/', $filecontentaction, $matches, PREG_SET_ORDER);
preg_match_all('/if.*\$action\s*==\s*[\'"][a-z\-]+[\'"].*$/', $filecontentaction, $matches, PREG_SET_ORDER);
foreach ($matches as $key => $val) {
if (!preg_match('/\$user->hasR/', $val[0])
&& !preg_match('/\$permission/', $val[0])