Fix warning
This commit is contained in:
parent
1fde0a70f5
commit
8dc89e9a9a
@ -264,7 +264,7 @@ $daylight = round($c - $b);
|
||||
$val = ($a >= 0 ? '+' : '').$a;
|
||||
$val .= ' ('.($a == 'unknown' ? 'unknown' : ($a >= 0 ? '+' : '').($a * 3600)).')';
|
||||
$val .= ' '.getServerTimeZoneString();
|
||||
$val .= ' '.$langs->trans("DaylingSavingTime").': '.($daylight === 'unknown' ? 'unknown' : ($a == $c ?yn($daylight) : yn(0).($daylight ? ' ('.$langs->trans('YesInSummer').')' : '')));
|
||||
$val .= ' '.$langs->trans("DaylingSavingTime").': '.(is_null($daylight) ? 'unknown' : ($a == $c ?yn($daylight) : yn(0).($daylight ? ' ('.$langs->trans('YesInSummer').')' : '')));
|
||||
print $form->textwithtooltip($val, $txt, 2, 1, img_info(''));
|
||||
print '</td></tr>'."\n"; // value defined in http://fr3.php.net/manual/en/timezones.europe.php
|
||||
print '<tr class="oddeven"><td> => '.$langs->trans("CurrentHour").'</td><td>'.dol_print_date(dol_now('gmt'), 'dayhour', 'tzserver').'</td></tr>'."\n";
|
||||
|
||||
@ -305,7 +305,7 @@ class BlockedLogAuthority
|
||||
|
||||
$res = getURLContent($url);
|
||||
echo $block->signature.' '.$url.' '.$res['content'].'<br>';
|
||||
if ($res === 'blockalreadyadded' || $res === 'blockadded') {
|
||||
if ($res['content'] === 'blockalreadyadded' || $res['content'] === 'blockadded') {
|
||||
$block->setCertified();
|
||||
} else {
|
||||
$this->error = $langs->trans('ImpossibleToContactAuthority ', $url);
|
||||
|
||||
@ -6264,7 +6264,7 @@ class FactureLigne extends CommonInvoiceLine
|
||||
$sql .= ", total_localtax2=".price2num($this->total_localtax2);
|
||||
}
|
||||
$sql .= ", fk_product_fournisseur_price=".(!empty($this->fk_fournprice) ? "'".$this->db->escape($this->fk_fournprice)."'" : "null");
|
||||
$sql .= ", buy_price_ht=".(($this->pa_ht || $this->pa_ht === 0 || $this->pa_ht === '0') ? price2num($this->pa_ht) : "null"); // $this->pa_ht should always be defined (set to 0 or to sell price depending on option)
|
||||
$sql .= ", buy_price_ht=".(($this->pa_ht || (string) $this->pa_ht === '0') ? price2num($this->pa_ht) : "null"); // $this->pa_ht should always be defined (set to 0 or to sell price depending on option)
|
||||
$sql .= ", fk_parent_line=".($this->fk_parent_line > 0 ? $this->fk_parent_line : "null");
|
||||
if (!empty($this->rang)) {
|
||||
$sql .= ", rang=".((int) $this->rang);
|
||||
|
||||
@ -343,7 +343,8 @@ function FileUpload($resourceType, $currentFolder, $sCommand, $CKEcallback = '')
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
||||
//var_dump($sFileName); var_dump(image_format_supported($sFileName));exit;
|
||||
$isImageValid = (image_format_supported($sFileName) >= 0 ? true : false);
|
||||
$imgsupported = image_format_supported($sFileName);
|
||||
$isImageValid = ($imgsupported >= 0 ? true : false);
|
||||
if (!$isImageValid) {
|
||||
$sErrorNumber = '202';
|
||||
}
|
||||
@ -387,7 +388,7 @@ function FileUpload($resourceType, $currentFolder, $sCommand, $CKEcallback = '')
|
||||
|
||||
if (file_exists($sFilePath)) {
|
||||
//previous checks failed, try once again
|
||||
if (isset($isImageValid) && $isImageValid === -1 && IsImageValid($sFilePath, $sExtension) === false) {
|
||||
if (isset($isImageValid) && $imgsupported === -1 && IsImageValid($sFilePath, $sExtension) === false) {
|
||||
dol_syslog("connector.lib.php IsImageValid is ko");
|
||||
@unlink($sFilePath);
|
||||
$sErrorNumber = '202';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user