Fix stickler-ci
This commit is contained in:
parent
a17ac09fd0
commit
0d1ee4e19f
@ -214,7 +214,7 @@ journalHead($nom, $nomlink, $period, $periodlink, $description, $builddate, $exp
|
|||||||
|
|
||||||
if ($object->nature == 4) { // Bank journal
|
if ($object->nature == 4) { // Bank journal
|
||||||
// Test that setup is complete (we are in accounting, so test on entity is always on $conf->entity only, no sharing allowed)
|
// Test that setup is complete (we are in accounting, so test on entity is always on $conf->entity only, no sharing allowed)
|
||||||
$sql = 'SELECT COUNT(rowid) as nb FROM ' . MAIN_DB_PREFIX . 'bank_account WHERE entity = ' . $conf->entity . ' AND fk_accountancy_journal IS NULL AND clos=0';
|
$sql = "SELECT COUNT(rowid) as nb FROM " . MAIN_DB_PREFIX . "bank_account WHERE entity = " . $conf->entity . " AND fk_accountancy_journal IS NULL AND clos=0";
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
|
|||||||
@ -324,7 +324,7 @@ class CodingPhpTest extends PHPUnit\Framework\TestCase
|
|||||||
$ok=false;
|
$ok=false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$this->assertTrue($ok, 'Found a forged SQL string that mix on same line the use of \' for PHP string and PHP variables into file '.$file['relativename'].' Use " to forge PHP string like this: $sql = "SELET ".$myvar...');
|
$this->assertTrue($ok, 'Found a forged SQL string that mix on same line the use of \' for PHP string and PHP variables into file '.$file['relativename'].' Use " to forge PHP string like this: $sql = "SELECT ".$myvar...');
|
||||||
|
|
||||||
// Check sql string VALUES ... , ".$xxx
|
// Check sql string VALUES ... , ".$xxx
|
||||||
// with xxx that is not 'db-' (for $db->escape). It means we forget a ' if string, or an (int) if int, when forging sql request.
|
// with xxx that is not 'db-' (for $db->escape). It means we forget a ' if string, or an (int) if int, when forging sql request.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user