Fix php8
This commit is contained in:
parent
cf0a1d1e14
commit
c3016c6175
@ -895,7 +895,12 @@ abstract class CommonDocGenerator
|
|||||||
//Add value to store price with currency
|
//Add value to store price with currency
|
||||||
$array_to_fill = array_merge($array_to_fill, array($array_key.'_options_'.$key.'_currency' => $object->array_options['options_'.$key.'_currency']));
|
$array_to_fill = array_merge($array_to_fill, array($array_key.'_options_'.$key.'_currency' => $object->array_options['options_'.$key.'_currency']));
|
||||||
} elseif ($extrafields->attributes[$object->table_element]['type'][$key] == 'select') {
|
} elseif ($extrafields->attributes[$object->table_element]['type'][$key] == 'select') {
|
||||||
$object->array_options['options_'.$key] = $extrafields->attributes[$object->table_element]['param'][$key]['options'][$object->array_options['options_'.$key]];
|
$valueofselectkey = $object->array_options['options_'.$key];
|
||||||
|
if (array_key_exists($valueofselectkey, $extrafields->attributes[$object->table_element]['param'][$key]['options'])) {
|
||||||
|
$object->array_options['options_'.$key] = $extrafields->attributes[$object->table_element]['param'][$key]['options'][$valueofselectkey];
|
||||||
|
} else {
|
||||||
|
$object->array_options['options_'.$key] = '';
|
||||||
|
}
|
||||||
} elseif ($extrafields->attributes[$object->table_element]['type'][$key] == 'checkbox') {
|
} elseif ($extrafields->attributes[$object->table_element]['type'][$key] == 'checkbox') {
|
||||||
$valArray = explode(',', $object->array_options['options_'.$key]);
|
$valArray = explode(',', $object->array_options['options_'.$key]);
|
||||||
$output = array();
|
$output = array();
|
||||||
@ -945,7 +950,11 @@ abstract class CommonDocGenerator
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$array_to_fill = array_merge($array_to_fill, array($array_key.'_options_'.$key => $object->array_options['options_'.$key]));
|
if (array_key_exists('option_'.$key, $object->array_options)) {
|
||||||
|
$array_to_fill = array_merge($array_to_fill, array($array_key.'_options_'.$key => $object->array_options['options_'.$key]));
|
||||||
|
} else {
|
||||||
|
$array_to_fill = array_merge($array_to_fill, array($array_key.'_options_'.$key => ''));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -904,11 +904,11 @@ class Translate
|
|||||||
* This function need module "numberwords" to be installed. If not it will return
|
* This function need module "numberwords" to be installed. If not it will return
|
||||||
* same number (this module is not provided by default as it use non GPL source code).
|
* same number (this module is not provided by default as it use non GPL source code).
|
||||||
*
|
*
|
||||||
* @param int $number Number to encode in full text
|
* @param int|string $number Number to encode in full text
|
||||||
* @param string $isamount ''=it's just a number, '1'=It's an amount (default currency), 'currencycode'=It's an amount (foreign currency)
|
* @param string $isamount ''=it's just a number, '1'=It's an amount (default currency), 'currencycode'=It's an amount (foreign currency)
|
||||||
* @return string Label translated in UTF8 (but without entities)
|
* @return string Label translated in UTF8 (but without entities)
|
||||||
* 10 if setDefaultLang was en_US => ten
|
* 10 if setDefaultLang was en_US => ten
|
||||||
* 123 if setDefaultLang was fr_FR => cent vingt trois
|
* 123 if setDefaultLang was fr_FR => cent vingt trois
|
||||||
*/
|
*/
|
||||||
public function getLabelFromNumber($number, $isamount = '')
|
public function getLabelFromNumber($number, $isamount = '')
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user