PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Mail » Mail_IMAPv2 » Bug #8744

manageMB method does not return actual result

Details

Submitted2006-09-20 14:08 UTC
Fromrix0r at rix0r dot nl
Assignedrichy
StatusClosed
PackageMail_IMAPv2
PHP Version5.1.4
OSWinXP
Roadmaps(Not assigned)

Comments

[2006-09-20 14:08 UTC] rix0r at rix0r dot nl

Description:
------------
A misplacement of the "return $ret;" statement in the manageMB() method causes the function never to return TRUE or FALSE, but always NULL.

Attached as test script is a unified diff that fixes this (and another perceived bug in that method), and replaces the "$ret = ...; ....; return $ret;" idiom with something a little more direct, namely a direct "return ...;"

Test script:
---------------
--- ManageMB.php Wed Sep 20 15:19:27 2006
+++ Kopie van ManageMB.php Wed Sep 20 15:20:37 2006
@@ -91 +91 @@
- $ret = TRUE;
+ return true;
@@ -94 +94 @@
- $ret = FALSE;
+ return false;
@@ -96 +95,0 @@
- break;
@@ -102,0 +102 @@
+ else
@@ -104 +104 @@
- $ret = TRUE;
+ return true;
@@ -107 +107 @@
- $ret = FALSE;
+ return false;
@@ -109 +108,0 @@
- break;
@@ -114 +113 @@
- $ret = TRUE;
+ return true;
@@ -117 +116 @@
- $ret = FALSE;
+ return false;
@@ -119 +117,0 @@
- break;
@@ -124 +122 @@
- $ret = FALSE;
+ return false;
@@ -126 +123,0 @@
- return $ret;