mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 01:28:19 +01:00
Fix phpunit
This commit is contained in:
@@ -12,7 +12,7 @@ if (empty($keyforselect) || empty($keyforelement) || empty($keyforaliasextra)) {
|
||||
|
||||
// Add extra fields
|
||||
$sql = "SELECT name, label, type, param, fieldcomputed, fielddefault FROM ".MAIN_DB_PREFIX."extrafields";
|
||||
$sql .= " WHERE elementtype = '".$this->db->escape($keyforselect)."' AND type <> 'separate' AND entity IN (0, ".$conf->entity.') ORDER BY pos ASC';
|
||||
$sql .= " WHERE elementtype = '".$this->db->escape($keyforselect)."' AND type <> 'separate' AND entity IN (0, ".((int) $conf->entity).') ORDER BY pos ASC';
|
||||
//print $sql;
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) { // This can fail when class is used on old database (during migration for example)
|
||||
|
||||
@@ -12,7 +12,7 @@ if (empty($keyforselect) || empty($keyforelement) || empty($keyforaliasextra)) {
|
||||
|
||||
// Add extra fields
|
||||
$sql = "SELECT name, label, type, param, fieldcomputed, fielddefault FROM ".MAIN_DB_PREFIX."extrafields";
|
||||
$sql .= " WHERE elementtype = '".$this->db->escape($keyforselect)."' AND type <> 'separate' AND entity IN (0, ".$conf->entity.') ORDER BY pos ASC';
|
||||
$sql .= " WHERE elementtype = '".$this->db->escape($keyforselect)."' AND type <> 'separate' AND entity IN (0, ".((int) $conf->entity).') ORDER BY pos ASC';
|
||||
//print $sql;
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) { // This can fail when class is used on old database (during migration for example)
|
||||
|
||||
@@ -227,6 +227,7 @@ class CodingPhpTest extends PHPUnit\Framework\TestCase
|
||||
if (! in_array($file['name'], array(
|
||||
'objectline_view.tpl.php',
|
||||
'extrafieldsinexport.inc.php',
|
||||
'extrafieldsinimport.inc.php',
|
||||
'DolQueryCollector.php'
|
||||
))) {
|
||||
// Must not found $this->db->
|
||||
|
||||
Reference in New Issue
Block a user