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

Bug #10196 Object Reference Assignment Error
Submitted: 2007-02-26 15:03 UTC Modified: 2007-02-26 15:05 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)    
Subscription  


 [2007-02-26 15: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.

Comments

 [2007-02-26 15: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.