Bug #20976 [Com]: Making static method non static - isError

From: Date: Sun, 29 Apr 2018 17:38:11 +0000
Subject: Bug #20976 [Com]: Making static method non static - isError
References: 1  Groups: php.pear.bugs 
Request: Send a blank email to pear-bugs+get-11419@lists.php.net to get a copy of this message
Edit report at http://pear.php.net/bugs/bug.php?id=20976&edit=1 ID: 20976 Comment by: sharonmiranda Reported By: withmiranda at gmail dot com Summary: Making static method non static - isError Status: Open Type: Bug Package: Mail_Queue Operating System: Linux CentOS Package Version: 1.2.7 PHP Version: 5.4.45 New Comment: mariom, can you please provide instruction as to how to apply your patch code? Previous Comments: ------------------------------------------------------------------------ [2017-01-11 02:28:33] mariom 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 { ------------------------------------------------------------------------ [2016-05-11 12:34:09] cody It is still broken, patch-link doesnt work (anymore?) ! ------------------------------------------------------------------------ [2016-03-17 09:01:24] artur link for patch dose't work (( ------------------------------------------------------------------------ [2015-10-29 11:14:52] mariom Added #patch bug:20976;patch:iserror.patch;revision:1446117292;. ------------------------------------------------------------------------ [2015-10-29 11:13:01] mariom 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 ------------------------------------------------------------------------ -- Edit this bug report at http://pear.php.net/bugs/bug.php?id=20976&edit=1

« previous php.pear.bugs (#11419) next »