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

Bug #18254 Strict Standards errors
Submitted: 2011-02-08 15:31 UTC
From: rudy_bruneau Assigned:
Status: Open Package: Mail (version 1.2.0)
PHP Version: 5.2.11 OS: Windows XP SP 3
Roadmaps: (Not assigned)    
Subscription  


 [2011-02-08 15:31 UTC] rudy_bruneau (Rudy Bruneau)
Description: ------------ With Php 5.2.11 i've a problem with is_a() method and when execute PEAR Mail script to send an email many Strict Standards errors displayed. - Strict Standards : Non-static method PEAR::isError() should not be called statically. - Strict Standards : Non-static method Mail::factory() should not be called statically. Actual result: -------------- Strict Standards: Non-static method Mail::factory() should not be called statically, assuming $this from incompatible context in [...] Strict Standards: is_a(): Deprecated. Please use the instanceof operator in /usr/share/php/PEAR.php on line 252 Strict Standards: Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in [...]

Comments

 [2011-08-18 06:20 UTC] danack (Dan Ackroyd)
I believe only the warning message "Non-static method Mail::factory() should not be called statically." This should be fixed by changing line 74 of Mail.php from function &factory($driver, $params = array()) to static function &factory($driver, $params = array())
 [2011-12-27 11:13 UTC] djeyewater (Dave Kennard)
If you look at the Mail class there are a few instances of it calling methods statically when the methods are not declared as static. I think the problem probably boils down to the class being written for PHP4, or at least being written to be PHP4 compatible. It would be nice to have a PHP5 fork of the code. I also have many other error messages caused by the Mail class, such as Non-static method PEAR::isError() should not be called statically, assuming $this from incompatible context in Net/SMTP.php on line 421