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

Bug #10196 Object Reference Assignment Error
Submitted: 2007-02-26 20:03 UTC
From: ajsharp at gmail dot com Assigned:
Status: Bogus Package: HTML_QuickForm (version 3.2.7)
PHP Version: 5.2.1 OS: Windows XP
Roadmaps: (Not assigned)    
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:
Solve the problem : 12 + 15 = ?

 [2007-02-26 20:03 UTC] ajsharp at gmail dot com (Alex Sharp)
Description: ------------ Depending on the script, I receive the following error message: An error occurred in script 'C:\wamp\php\PEAR\HTML\QuickForm.php' on line 566: Assigning the return value of new by reference is deprecated Line 566 is the following: '$elementObject =& new $className();' I assume this has something to do with how PHP 4 and PHP 5 assign references to objects differently. The weird part is that in some scripts I get this error, and in others I don't. Further, it occurs several times at different points in 'Quickform.php', 'PEAR.php', and 'Registry.php'. Scrolling further down the script, I get the same error but in a different file: An error occurred in script 'C:\wamp\php\PEAR\HTML\QuickForm\RuleRegistry.php' on line 217: is_a(): Deprecated. Please use the instanceof operator Finally, at the end of all these errors, the form still displays. In the script where I am getting these errors, I utilize some of my own classes. Still, I tried implementing the class in the script where I don't receive the error, and even using some PHP 5 distinct features, and everything worked fine. Any help would be much appreciated.


 [2007-02-26 20:05 UTC] avb (Alexey Borzov)
These are PHP5 E_STRICT errors and they cannot be "fixed" since QuickForm has to work with PHP4. QuickForm2 will be PHP5 package and will work under E_STRICT.