fix php warning

This commit is contained in:
florian HENRY 2019-04-18 20:37:27 +02:00
parent 2b6cdd2e33
commit 83cf08f2eb

View File

@ -51,7 +51,7 @@ function shipping_prepare_head($object)
{
// delivery link
$object->fetchObjectLinked($object->id,$object->element);
if (count($object->linkedObjectsIds['delivery']) > 0) // If there is a delivery
if (is_array($object->linkedObjectsIds['delivery']) && count($object->linkedObjectsIds['delivery']) > 0) // If there is a delivery
{
// Take first one element of array
$tmp = reset($object->linkedObjectsIds['delivery']);