Fix php warning
This commit is contained in:
parent
a5d210195c
commit
db9cc4683a
@ -4207,7 +4207,7 @@ abstract class CommonObject
|
||||
|
||||
if (! is_array($optionsArray))
|
||||
{
|
||||
// $extrafields is not a known object, we initialize it. Best practice is to have $extrafields defined into card.php or list.php page.
|
||||
// If $extrafields is not a known object, we initialize it. Best practice is to have $extrafields defined into card.php or list.php page.
|
||||
// TODO Use of existing extrafield is not yet ready (must mutualize code that use extrafields in form first)
|
||||
// global $extrafields;
|
||||
//if (! is_object($extrafields))
|
||||
@ -4228,7 +4228,7 @@ abstract class CommonObject
|
||||
if ($table_element == 'categorie') $table_element = 'categories'; // For compatibility
|
||||
|
||||
// Request to get complementary values
|
||||
if (count($optionsArray) > 0)
|
||||
if (is_array($optionsArray) && count($optionsArray) > 0)
|
||||
{
|
||||
$sql = "SELECT rowid";
|
||||
foreach ($optionsArray as $name => $label)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user