Member
Member
ism-design   2013-08-29, 08:30
#1

Hi

I am having a weird issue, everything works fine except the last image of every album will not show but gets an error returned.

Fatal error: Call to a member function getTitle() on a non-object in /home/content/00/7926600/html/i-am-peter.com/themes/Square-One/image.php on line 27

Only happens with last image.

This is the code I use, and where I expect an issue.

next image is

Administrator
Administrator
acrylian   2013-08-29, 08:51
#2

You need to check if there is a next image. If there is not there is no object and this error is natural.

There are theme functions for next/prev images (you normally don't need to use the oject methodes directly here) or you have check i $nextim is an object. Same applies of course for the previous image.

Member
Member
ism-design   2013-08-29, 10:29
#3

Hi Acrylian, thanks for the fast reply.

this error also occurs when clicking on the last image in any of my albums.

site is www.i-am-peter.com

Administrator
Administrator
acrylian   2013-08-29, 13:36
#4

Yes because you don't check if there is a next image. Please review the theming tutorial and the standard themes regarding the next/prev navigation.

Member
Member
ism-design   2013-08-29, 20:50
#5

Hi again Acrylian

I could not find anything about the navigation in the user guides, but managed to get it working by re-copying the working code from skeleton theme and re-arranging things a bit.

Thanks again for replying

P.H.

Administrator
Administrator
acrylian   2013-08-30, 08:35
#6

The theming tutorial has examples of standard theme pages that exactly show the next/prev function usage. Of course zpSkeleton is a not a official theme and does a few things off the "standard".

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.