1
sailjapan
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.

2
zyspec
Re: Magazine 1.2 & wfsection (with pdf) 2.07 mods. Errors on install.
  • 2010/3/8 4:33

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


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.

3
sailjapan
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.

4
sugar
Re: Magazine 1.2 & wfsection (with pdf) 2.07 mods. Errors on install.
  • 2010/3/8 5:31

  • sugar

  • Just popping in

  • Posts: 26

  • Since: 2003/8/24


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

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

Many thanks, sugar.

Login

Who's Online

210 user(s) are online (74 user(s) are browsing Support Forums)


Members: 0


Guests: 210


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits