Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 2.5.1

Bug #812 PHP5: assign to $this ==> Fatal Error
Submitted: 2004-02-20 17:55 UTC
From: quipo Assigned: quipo
Status: Closed Package: Pager
PHP Version: 5.0.0b4 (beta4) OS:
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 49 + 50 = ?

 
 [2004-02-20 17:55 UTC] quipo
Description: ------------ PHP5 will raise a Fatal Error when assigning to $this. Pager 2.x constructor uses this hack to act as a delegate. It was the only known way to maintain BC with Pager 1.x. WORKAROUND =========== This is how your PHP 4 script should look like: <?php require_once 'Pager/Pager.php'; $pager = &new Pager($params); //... ?> Change the above code to the following one if you are using PHP 5: <?php require_once 'Pager/Sliding.php'; // or Jumping.php $pager = &new Pager_Sliding($params); //or Pager_Jumping() //... ?>

Comments

 [2004-04-15 11:15 UTC] php-qa at sebastianmendel dot de
when will this be fixed in the package? using PEAR_Webinstaller raises this error, but i have no intention to edit this Files ...
 [2004-04-15 19:41 UTC] quipo
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pear.php.net. In case this was a pear.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better.