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