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

Bug #9947 Avoid some strict warnings
Submitted: 2007-01-25 17:33 UTC
From: schmidt Assigned: chagenbu
Status: Closed Package: Mail (version 1.1.14)
PHP Version: 5.1.4 OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2007-01-25 17:33 UTC] schmidt (Christian Schmidt)
Description: ------------ I know that the Mail package in general is not E_STRICT compliant. However, we run with E_STRICT error-reporting and let our custom error-handler mute strict warnings from third-party code (PEAR etc.). This works pretty good, except when using an opcode cache like e.g. xcache. In this case, there is (at least) one kind of strict warnings cannot be caught by the error-handler, namely "Strict Standards: Assigning the return value of new by reference is deprecated" caused by code like this: $foo =& new Bar(). Apart from this, everything else works fine. Luckily there are only a few occurrences of this pattern in the PEAR packages that we use. A number of these are in the Mail and Net/SMTP packages. While there may be a marginal difference in performance, I believe these two statements are functionally identical: $foo =& new Bar(); $foo = new Bar(); Any chance the latter form could be used by Mail and Net/SMTP? As far as I am concerned, it makes no difference to PHP4 users or PHP5 users running without strict error reporting. Thanks :-)

Comments

 [2007-01-25 18:40 UTC] chagenbu at php dot net (Chuck Hagenbuch)
I have no problem with this. Done in CVS, so it'll be in the next release. I'd rather not roll a release just for this, though.