diff --git a/assets/php/template.php b/assets/php/template.php index ea047ea..61c9ee1 100644 --- a/assets/php/template.php +++ b/assets/php/template.php @@ -376,14 +376,14 @@ $names = array(); $directions = array(); $phones = array(); - - foreach($cinemas as $key => $value){ - $ids[$key] = $value->getId(); - $names[$key] = $value->getName(); - $directions[$key] = $value->getDirection(); - $phones[$key] = $value->getPhone(); + if(is_array($cinemas)){ + foreach($cinemas as $key => $value){ + $ids[$key] = $value->getId(); + $names[$key] = $value->getName(); + $directions[$key] = $value->getDirection(); + $phones[$key] = $value->getPhone(); + } } - switch($this->page){ case "Panel de Administrador": echo "