Nucleus Support Forum Index

Find on the forum:
any terms  all terms  Advanced Search

RSS 2.0
Browse posts: Unanswered | Mark all read

« »
Loading Nucleus FAQ ticker...
Post new topic Reply to topic
Author Message
kogger
Nucleus Newbie


Joined: 01 Aug 2005
Posts: 5

Post Posted: Mon Aug 01, 2005 1:38 am   Post subject: problem with Modify Album - NP_Gallery (fix for PHP5)
Reply with quote

Hello,

I keep getting this error when I try to use the "Modify Album" form.

Code:
<b>Fatal error</b>:  Using $this when not in object context in <b>/data/www/kog/public_html/nucleus/plugins/gallery/album_class.php</b> on line <b>105</b><br />


I've looked at the source code and the call is made from the forms.php file at about line 106 (V 0.8 of NP_Gallery) in function editAlbumForm()

Code:
$pics = ALBUM::get_pictures($id);


Any help would be much appreciated.

_________________
kog[ger]

Back to top

View user's profile Send private message MSN Messenger
kogger
Nucleus Newbie


Joined: 01 Aug 2005
Posts: 5

Post Posted: Sat Sep 24, 2005 12:15 am   Post subject: Found the answer
Reply with quote

Seems it was a problem with PHP 5 and the fact that the function get_pictures() in the ALBUM class made use of an member with a "$this->" reference. Which you're not suppose to do unless you instantiate a class object.

Changing line 106 in form.php from

Code:
$pics = ALBUM::get_pictures($id);


to

Code:
$tempalbum = new ALBUM;
$pics = $tempalbum->get_pictures($id);


solved all my issues.

_________________
kog[ger]

Back to top

View user's profile Send private message MSN Messenger
Post new topic Reply to topic
Display posts from previous:   

Page 1 of 1

All times are GMT + 1 Hour

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2002 phpBB Group