From 5866facf11db40bcd84c7d074bd4a17bc97e5a6b Mon Sep 17 00:00:00 2001 From: Francis Appels Date: Wed, 4 Nov 2020 20:31:55 +0100 Subject: [PATCH] Update commonobject. Don't think $fk_delivery_address is deprecated, also no alternative indicated. Switch of implode paramenters. showInputField preselected value for array type can be array. --- htdocs/core/class/commonobject.class.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 5d6771d88df..93573415afe 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -312,7 +312,6 @@ abstract class CommonObject /** * @var int Delivery address ID * @see setDeliveryAddress() - * @deprecated */ public $fk_delivery_address; @@ -5009,7 +5008,7 @@ abstract class CommonObject { $value_arr = GETPOST($postfieldkey, 'array'); // check if an array if (!empty($value_arr)) { - $value_key = implode($value_arr, ','); + $value_key = implode(',', $value_arr); } else { $value_key = ''; } @@ -5801,7 +5800,7 @@ abstract class CommonObject * * @param array $val Array of properties for field to show (used only if ->fields not defined) * @param string $key Key of attribute - * @param string $value Preselected value to show (for date type it must be in timestamp format, for amount or price it must be a php numeric value) + * @param string|array $value Preselected value to show (for date type it must be in timestamp format, for amount or price it must be a php numeric value, for array type must be array) * @param string $moreparam To add more parameters on html input tag * @param string $keysuffix Prefix string to add into name and id of field (can be used to avoid duplicate names) * @param string $keyprefix Suffix string to add into name and id of field (can be used to avoid duplicate names)