xoops forums

sailjapan

Moderator
Posted on: 2010/3/8 0:18
sailjapan
sailjapan (Show more)
Moderator
Posts: 1672
Since: 2005/11/16
#1

Magazine 1.2 & wfsection (with pdf) 2.07 mods. Errors on install.

Fatal error: Cannot re-assign $this in /home/xxxx/public_html/modules/magazine/class/article.php on line 613

Line 613 reads: $this = false;
Also get a similar error when installing wfsection_with_pdf_2.07:

Fatal error: Cannot redeclare WfsArticle::$groupid in /home/bob/public_html/modules/wfsection/class/wfsarticle.php on line 90

Line 90 reads: var $groupid = '1 2 3';

Any ideas? If these are not related (which they may be as one is a hack of the other) I'll split this thread.

zyspec

Module Developer
Posted on: 2010/3/8 4:33
zyspec
zyspec (Show more)
Module Developer
Posts: 1056
Since: 2004/9/21
#2

Re: Magazine 1.2 & wfsection (with pdf) 2.07 mods. Errors on install.

sailjapan,

I don't think these are related. The error in /class/article.php (line 613) either delete the line or comment it out like this:

// $this = false;


$this can't be used as a 'variable' in a class in PHP5, $this has a special meaning. Setting it = false doesn't really make sense in this context.

The other issue looks to be the code calling the WfsArticle::$groupid. It's already been defined somewhere else and the code is trying to declare it again.

sailjapan

Moderator
Posted on: 2010/3/8 4:50
sailjapan
sailjapan (Show more)
Moderator
Posts: 1672
Since: 2005/11/16
#3

Re: Magazine 1.2 & wfsection (with pdf) 2.07 mods. Errors on install.

Thanks for the hints, zyspec. I'll try commenting it out but I susspect that the Magazine module will still crash as there are $this declarations all over the place. Maybe not comatible with php5

The redeclaration was probably because I had tried to run both wf and Magazine together at the same time. Magazine is a hack of wfsection, apparently. Probably noth have the same db structure which would explain why wf couldn't declare it. I'll try uninstalling both mods and trying them one at a time with commented out $this.

Cheers for your help.

sugar

Just popping in
Posted on: 2010/3/8 5:31
sugar
sugar (Show more)
Just popping in
Posts: 26
Since: 2003/8/24
#4

Re: Magazine 1.2 & wfsection (with pdf) 2.07 mods. Errors on install.

for PHP5
$this = false; must change to unset($this);

three files need hack
magazine/class/article.php       on line 613
magazine
/class/articleres.php   on line 71
magazine
/class/category.php    on line 218


http://xoops.tnc.edu.tw/modules/newbb/viewtopic.php?topic_id=8692

sailjapan

Moderator
Posted on: 2010/3/10 9:59
sailjapan
sailjapan (Show more)
Moderator
Posts: 1672
Since: 2005/11/16
#5

Re: Magazine 1.2 & wfsection (with pdf) 2.07 mods. Errors on install.

Many thanks, sugar.