Fix bad operator for and
This commit is contained in:
parent
41cabeee59
commit
96215ccea5
@ -480,10 +480,10 @@ function backup_tables($outputfile, $tables='*')
|
||||
if ($row[$j] == null and !is_string($row[$j])) {
|
||||
// IMPORTANT: if the field is NULL we set it NULL
|
||||
$row[$j] = 'NULL';
|
||||
} elseif(is_string($row[$j]) and $row[$j] == '') {
|
||||
} elseif(is_string($row[$j]) && $row[$j] == '') {
|
||||
// if it's an empty string, we set it as an empty string
|
||||
$row[$j] = "''";
|
||||
} elseif(is_numeric($row[$j]) and !strcmp($row[$j], $row[$j]+0) ) { // test if it's a numeric type and the numeric version ($nb+0) == string version (eg: if we have 01, it's probably not a number but rather a string, else it would not have any leading 0)
|
||||
} elseif(is_numeric($row[$j]) && !strcmp($row[$j], $row[$j]+0) ) { // test if it's a numeric type and the numeric version ($nb+0) == string version (eg: if we have 01, it's probably not a number but rather a string, else it would not have any leading 0)
|
||||
// if it's a number, we return it as-is
|
||||
// $row[$j] = $row[$j];
|
||||
} else { // else for all other cases we escape the value and put quotes around
|
||||
|
||||
@ -550,7 +550,7 @@ class RssParser
|
||||
//
|
||||
elseif ($this->_format == 'atom' and $el == 'link' )
|
||||
{
|
||||
if ( isset($attrs['rel']) and $attrs['rel'] == 'alternate' )
|
||||
if ( isset($attrs['rel']) && $attrs['rel'] == 'alternate' )
|
||||
{
|
||||
$link_el = 'link';
|
||||
}
|
||||
|
||||
@ -174,7 +174,7 @@ function FileUpload($resourceType, $currentFolder, $sCommand, $CKEcallback = '')
|
||||
|
||||
if ( isset( $_FILES['NewFile'] ) && !is_null($_FILES['NewFile']['tmp_name'])
|
||||
// This is for the QuickUpload tab box
|
||||
or (isset($_FILES['upload']) and !is_null($_FILES['upload']['tmp_name'])))
|
||||
or (isset($_FILES['upload']) && !is_null($_FILES['upload']['tmp_name'])))
|
||||
{
|
||||
global $Config ;
|
||||
|
||||
|
||||
@ -137,7 +137,7 @@ class pdf_standard
|
||||
$imgscaleheight=(empty($forceimgscalewidth)?0.5:$forceimgscalewidth); // Scale of image for height (1=Full height of sticker)
|
||||
|
||||
// We are in a new page, then we must add a page
|
||||
if (($this->_COUNTX ==0) and ($this->_COUNTY==0) and (!$this->_First==1)) {
|
||||
if (($this->_COUNTX ==0) && ($this->_COUNTY==0) and (!$this->_First==1)) {
|
||||
$pdf->AddPage();
|
||||
}
|
||||
$this->_First=0;
|
||||
|
||||
@ -135,7 +135,7 @@ class pdf_standardlabel
|
||||
$imgscaleheight=(empty($forceimgscalewidth)?0.5:$forceimgscalewidth); // Scale of image for height (1=Full height of sticker)
|
||||
|
||||
// We are in a new page, then we must add a page
|
||||
if (($this->_COUNTX ==0) and ($this->_COUNTY==0) and (!$this->_First==1)) {
|
||||
if (($this->_COUNTX ==0) && ($this->_COUNTY==0) and (!$this->_First==1)) {
|
||||
$pdf->AddPage();
|
||||
}
|
||||
$this->_First=0;
|
||||
|
||||
@ -882,7 +882,7 @@ if ($action == 'create')
|
||||
if (($line->product_type == 1 && empty($conf->global->STOCK_SUPPORTS_SERVICES)) || $defaultqty < 0) $defaultqty=0;
|
||||
}
|
||||
|
||||
if (empty($conf->productbatch->enabled) || ! ($product->hasbatch() and is_object($product->stock_warehouse[$warehouse_id])))
|
||||
if (empty($conf->productbatch->enabled) || ! ($product->hasbatch() && is_object($product->stock_warehouse[$warehouse_id])))
|
||||
{
|
||||
// Quantity to send
|
||||
print '<td align="center">';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user