0

I am receiving the following error in PHP:

Notice: Undefined offset: 1 on line 552 in file includes/classes/ia.core.smarty.php

Here is the PHP code that causes it:

} else { // this scheme used by plugins
            list($path, $file) = explode('|', $params['file']);
            $type = !isset($params['type']) ? 'thumbnail' : $params['type'];

            $url = $iaCore->iaView->assetsUrl . 'uploads/' . $path . $type . '/' . $file;
        }

What does the error mean? On pages i get this error thumbnails are not displayed. Thanks

LF00
  • 27,015
  • 29
  • 156
  • 295
  • offset in your case is "file" and "type" – Mario Apr 08 '17 at 21:20
  • i think problem isn't here, problem is there where from you are calling this class . Check what type of arguments are you sending to this class. – Mubashar Iqbal Apr 08 '17 at 21:22
  • this line is probably causing error `$url = $iaCore->iaView->assetsUrl . 'uploads/' . $path . $type . '/' . $file;` try to `print_r($url);` and you will see what it will return – Mario Apr 08 '17 at 21:22
  • 3
    The only place offset 1 is used is in the list($path, $file)... line. IMO the error can only mean that the exploded array doesn't have an index > 0. Ergo $params['file'] doesn't contain any pipes (|). – jh1711 Apr 08 '17 at 21:38

0 Answers0