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

Bug #20976 Making static method non static - isError
Submitted: 2015-10-29 15:13 UTC
From: mariom Assigned:
Status: Feedback Package: Mail_Queue (version 1.2.7)
PHP Version: 5.4.45 OS: Linux CentOS
Roadmaps: (Not assigned)    
Subscription  


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:
MUST BE VALID
Solve the problem : 36 + 42 = ?

 
 [2015-10-29 15:13 UTC] mariom (Mariusz Kozakowski)
Description: ------------ Hi, Mail_Queue is broken, as it tries to make static method PEAR::isError() nonstatic on line 590 in Mail_Queue.php Just adding the keyword "static" fixes the problem. Test script: --------------- <?php printf("before\n"); require_once 'Mail/Queue.php'; printf("after\n"); Expected result: ---------------- before after Actual result: -------------- before PHP Fatal error: Cannot make static method PEAR::isError() non static in class Mail_Queue in /usr/share/pear/Mail/Queue.php on line 126

Comments

 [2015-10-29 15:14 UTC] mariom (Mariusz Kozakowski)
 [2016-03-17 13:01 UTC] artur (artur konjak)
link for patch dose't work ((
 [2016-05-11 16:34 UTC] cody (cody dmc187)
It is still broken, patch-link doesnt work (anymore?) !
 [2017-01-11 07:28 UTC] mariom (Mariusz Kozakowski)
Hi! I get few emails that patch link does not work anymore. As patch is short I'll past it in comment: diff --git fudge/general/www.inc fudge/general/www.inc index 8a79fa1..b89fe29 100755 --- fudge/general/www.inc +++ fudge/general/www.inc @@ -112,10 +112,10 @@ function valid_email($e) // dot character cannot be the first or last character in the local-part // and it cannot appear two or more times consecutively - if (preg_match('/^[a-zA-Z]+(([\'\,\.\- ][a-zA-Z ])?[a-zA-Z]*)*\s+<(['.$local.']+(\.['.$local.']+)*@(((?:[\da-zA-Z]|[\da-zA-Z][\'-\w]*[\da-zA-Z])\.)+[a-zA-Z]{2,7}))>$/', $e)) { + if (preg_match('/^[a-zA-Z]+(([\'\,\.\- ][a-zA-Z ])?[a-zA-Z]*)*\s+<(['.$local.']+(\.['.$local.']+)*@(((?:[\da-zA-Z]|[\da-zA-Z][\'\-\w]*[\da-zA-Z])\.)+[a-zA-Z]{2,7}))>$/', $e)) { // matches email with display name, for example, 'Someone <some.one@squiz.net>' return TRUE; - } else if (preg_match('/^(['.$local.']+(\.['.$local.']+)*@(((?:[\da-zA-Z]|[\da-zA-Z][\'-\w]*[\da-zA-Z])\.)+[a-zA-Z]{2,7}))$/', $e)) { + } else if (preg_match('/^(['.$local.']+(\.['.$local.']+)*@(((?:[\da-zA-Z]|[\da-zA-Z][\'\-\w]*[\da-zA-Z])\.)+[a-zA-Z]{2,7}))$/', $e)) { // matches normal email address return TRUE; } else {
 [2018-04-29 17:16 UTC] sharonmiranda (sharon miranda)
mariom, can you please provide instruction as to how to apply your patch code?
 [2018-04-30 15:14 UTC] ashnazg (Chuck Burgess)
sharonmiranda, that patch from 2017 does not appear to be relevant to this bug report. The fix as described in the initial bug report is to just add "static" to the function definition for "isError()" in the Mail/Queue.php file. As long as you are running PHP5 or higher, that should work for you.
 [2019-03-20 21:30 UTC] quipo (Lorenzo Alberton)
-Status: Open +Status: Feedback
Patch available here: https://github.com/pear/Mail_Queue/pull/2