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  


 [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.