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

Bug #2379 Unnecessary text in the cmdDeleteACL() function gives rise to PHP errors
Submitted: 2004-09-23 11:07 UTC
From: omicron at mighty dot co dot za Assigned: damian
Status: Closed Package: Net_IMAP
PHP Version: Irrelevant OS: All
Roadmaps: (Not assigned)    

 [2004-09-23 11:07 UTC] omicron at mighty dot co dot za
Description: ------------ IMAPProtocol::cmdDeleteACL() references a variable named $acl which is not present within the function, causing PHP to issue errors. This problem looks to be a copy-paste bug, as the problematic block of code within the cmdDeleteACL() function (in IMAPProtocol.php) is also present in the cmdSetACL() function which is directly above; cmdSetACL(), however, actually uses this $acl variable. The attached patch removes this unnecessary block, as well as fixes a small typo in the main IMAP.php file. Reproduce code: --------------- diff -U3 IMAP.php.old IMAP.php --- IMAP.php.old 2004-08-05 04:37:18.000000000 +0200 +++ IMAP.php 2004-09-23 12:29:52.423456777 +0200 @@ -1484,7 +1484,7 @@ /****************************************************************** ** ** - ** ALC METHODS ** + ** ACL METHODS ** ** ** ******************************************************************/ diff -U3 IMAPProtocol.php.old IMAPProtocol.php --- IMAPProtocol.php.old 2004-08-05 05:03:45.000000000 +0200 +++ IMAPProtocol.php 2004-09-23 12:30:52.686565719 +0200 @@ -1535,9 +1535,6 @@ return new PEAR_Error("This IMAP server does not support ACL's! "); } $mailbox_name=sprintf("\"%s\"",$this->utf_7_encode($mailbox_name) ); - if(is_array($acl)){ - $acl=implode('',$acl); - } return $this->_genericCommand('DELETEACL', sprintf("%s \"%s\"",$mailbox_name,$user) ); } Expected result: ---------------- No errors are issued when calling the IMAP::deleteACL() method. Actual result: -------------- When calling IMAP::deleteACL(), PHP issues errors in the relevant logs about the unknown variable "$acl".


 [2004-09-23 11:15 UTC] omicron at mighty dot co dot za
A note about the attached patch: It was generated against the latest available release (from rather than the latest CVS code (from pear/Net_IMAP), as the CVS version seems to be quite different to the released version (out of date?).
 [2004-09-25 15:19 UTC] damian
Thank you for your bug report. This issue has been fixed in the latest released version of the package, which you can download at Yes it was a Copy-Paste bug!