Explorar el Código

Fix array index

Guillermo Espinoza hace 7 años
padre
commit
35d336147d
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      Twig/DeviceLogExtension.php

+ 1 - 1
Twig/DeviceLogExtension.php

@@ -62,7 +62,7 @@ class DeviceLogExtension extends \Twig_Extension
         $device = $this->webservice->get($this->deviceGetUrl, $filters);
         
         $log = '';
-        if (count($device)) {
+        if (count($device) && isset($device[0])) {
             $filters = array(
                 'device' => $device[0]['id'],
             );