1
Ronaldus
WF Sections 2.07 PHP5 error
  • 2008/3/21 9:08

  • Ronaldus

  • Friend of XOOPS

  • Posts: 389

  • Since: 2004/5/8 1


Hello people,

I'm preparing for a move towards PHP5.
When I access my site on my local XAMPP, with PHP 5.2.5, I get the following message:

Fatal error: Cannot redeclare WfsArticle::$groupid in D:\Xampp\htdocs\trauma\stnn\modules\wfsection\class\wfsarticle.php on line 89

On that line I read:
var $groupid = '1 2 3';

A while ago I upgraded to WFSections 2.07 because this version was supposed to be PHP 5 ready.
Now this seems to be not the case.
From version 2.07 it is NOT possible to upgrade to SmartSections 2.13, so now I'm stuck.

Any help or advice would be appreciated !!

Thx in advance and kind greetings,

2
zyspec
Re: WF Sections 2.07 PHP5 error
  • 2008/3/21 16:08

  • zyspec

  • Module Developer

  • Posts: 1095

  • Since: 2004/9/21


I haven't really looked through the code very much but it appears that you should be able to change from:
var $groupid '1 2 3';
to
private $groupid '1 2 3';


In PHP5 this will restrict direct access to the $groupid variable inside the class to other functions within the class. This could cause problems if the module developer didn't use 'restraint' and accessed $groupid directly instead of through the class. This would most likely effect permissions to the various articles/categories.

You might try the change and test it under various conditions to make sure that it looks like it's working.

3
Trier
Re: WF Sections 2.07 PHP5 error
  • 2008/3/21 19:57

  • Trier

  • Friend of XOOPS

  • Posts: 12

  • Since: 2007/3/18



4
Ronaldus
Re: WF Sections 2.92 error
  • 2008/3/22 12:48

  • Ronaldus

  • Friend of XOOPS

  • Posts: 389

  • Since: 2004/5/8 1


I'm sorry Trier,

I tried your module, but now I get an error when I want to publish a new article, and this happens in PHP4 and PHP5...

The error is:
ErrorError while creating article

INSERT INTO xb7bfc_wfs_article articleidgroupidcategoryidweighttitlesubtitlemaintextsummaryurlurlnamecreatedpublishedexpiredusertypenohtmlnosmileynoxcodesnobreaksnotifypuballowcomuidhtmlpagepdfpageisframeofflinepagenoshowartcmainmenucounterisforumidarticleimgwrapurlversionspotlightspotlightmain VALUES 0'1 2 3 4 5'80'test doc''''test text in this document test text in this document test text in this document test text in this document '''''''120619807212061980720'admin',0001011'''' ,0000000''''1.010)

in file /modules/wfsection/class/wfsarticle.php line 478


Line 471 till 481 are:
if ( !$result $this->db->queryF$sql ) ) {
            
trigger_error$errorE_USER_ERROR );
        } else {
            
$this->articleid = ( $this->articleid ) ? $this->articleid $this->db->getInsertId();
        }


Besides this I get no blank page anymore, and I'm able to create a new section, so I think we're improving....
But I get the same error when I'm trying to update an article...

Any help is appreciated.

Thx in advance and greetings,

Login

Who's Online

214 user(s) are online (121 user(s) are browsing Support Forums)


Members: 0


Guests: 214


more...

Donat-O-Meter

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

Latest GitHub Commits