title: Prestashop Notice: Undefined offset: 0
body: <p>i use prestashop 1.5.6, i tryed to follow <a href="http://emilienmalbranche.fr/prestashop-ecommerce-tutoriels/tutoriels/afficher-image-secondaire-survol-produits-prestashop/" rel="nofollow noreferrer">this tutorial </a>.</p>
  
  <p>It works but it also give me this error 24 times on the top of the page :</p>
  
  <blockquote>
    <p>Notice: Undefined offset: 0 in
    /home/deveskemhu/www/classes/Category.php on line 3157</p>
  </blockquote>
  
  <p>i had to add this before the last brace : </p>
  
  <pre><code>   public static function getProductsImgSupp($product_id)
  
     {
  
      $sql = '
  
      SELECT id_image, id_product from `'._DB_PREFIX_.'image`
  
      WHERE id_product="'.$product_id.'"
  
      ORDER BY `position` ASC
  
      LIMIT 1,1
  
      ';
  
      $result = Db::getInstance()-&gt;ExecuteS($sql);
  
      return $result[0]['id_product'].'-'.$result[0]['id_image'];
  
      }
  </code></pre>
  
  <p>Line 3157 is the one before the closing brace in the code above.</p>
  
  <p>what can i do to fix it ?</p>