diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php
index 198d42a1489..0fdd5dd640e 100644
--- a/htdocs/expedition/fiche.php
+++ b/htdocs/expedition/fiche.php
@@ -691,9 +691,13 @@ else
// Sending method
print '
| '.$langs->trans("SendingMethod").' | ';
print '';
- // Get code using getLabelFromKey
- $code=$langs->getLabelFromKey($db,$expedition->expedition_method_id,'expedition_methode','rowid','code');
- print $langs->trans("SendingMethod".strtoupper($code));
+ if ($expedition->expedition_method_id > 0)
+ {
+ // Get code using getLabelFromKey
+ $code=$langs->getLabelFromKey($db,$expedition->expedition_method_id,'expedition_methode','rowid','code');
+ print $langs->trans("SendingMethod".strtoupper($code));
+ }
+ else print ' ';
print ' | ';
print '
';
diff --git a/htdocs/lib/functions.lib.php b/htdocs/lib/functions.lib.php
index 27d521ee375..47e15ab4e71 100644
--- a/htdocs/lib/functions.lib.php
+++ b/htdocs/lib/functions.lib.php
@@ -412,7 +412,7 @@ function dol_print_date($time,$format='',$to_gmt=false,$outputlangs='')
|| eregi('^([0-9][0-9][0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])$',$time,$reg))
{
// This part of code should not be used.
- dolibarr_syslog("Functions.lib::dolibarr_print_date function call with deprecated parameter in page ".$_SERVER["PHP_SELF"], LOG_WARNING);
+ dolibarr_syslog("Functions.lib::dolibarr_print_date function call with deprecated value of time in page ".$_SERVER["PHP_SELF"], LOG_WARNING);
// Date has format 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM:SS' or 'YYYYMMDDHHMMSS'
$syear = $reg[1];
$smonth = $reg[2];