Backtrace: NOTICE: Undefined variable:

I've just noticed my debug log is full of these errors:

` Backtrace: NOTICE: Undefined variable: firstPageImages in /site/image.php on line 122

include called

from index.php [92] `

what is causing this? line 122 in image.php is:

` <?php while (next_image(false, $firstPageImages)): ?>

`

Comments

  • I can only guess since you have told us nothing of what theme you are using. But almost certainly this is because the theme did not setup the `$firstPageImages` variable that it is referencing in that line.

    BTW, it is fairly unusual for the `image.php` script to be looping on the images. Normally it is used to display just the single image it was launched to show. The `next_image()` loop is normally found only in the `album.php` script.
  • sorry, its a custom theme. It has this section below the image to show more from the same category

    `



    <?php while (next_image(false, $firstPageImages)): ?>



    <?php endwhile; ?>



    `

    can you give me any pointers? do you need to see the whole file? also what do you mean by setup the variable?

    thanks a lot
  • Most likely you should just remove the parameter. But only the theme author knows what was intended. Sorry, but for obvious reasons we cannot provide support to themes we did not develop.
Sign In or Register to comment.