[wp-trac] [WordPress Trac] #10587: POP3 class does not differentiate between 0 messages and failure to login

WordPress Trac wp-trac at lists.automattic.com
Tue Aug 11 15:41:20 UTC 2009


#10587: POP3 class does not differentiate between 0 messages and failure to login
--------------------------+-------------------------------------------------
 Reporter:  robfelty      |       Owner:            
     Type:  defect (bug)  |      Status:  new       
 Priority:  normal        |   Milestone:  Unassigned
Component:  Mail          |     Version:  2.9       
 Severity:  normal        |    Keywords:  email     
--------------------------+-------------------------------------------------
 The login function in wp-includes/class-pop3.php states that it returns
 false on failure, but it also returns false if there are no messages.
 These should be 2 different scenarios. I have fixed the problem. Here is
 an svn diff:

 {{{
 $ svn diff ../../../wp-includes/class-pop3.php
 Index: ../../../wp-includes/class-pop3.php
 ===================================================================
 --- ../../../wp-includes/class-pop3.php (revision 11572)
 +++ ../../../wp-includes/class-pop3.php (working copy)
 @@ -212,7 +212,8 @@
                  return false;
              } else {
                  $count = $this->pass($pass);
 -                if( (!$count) || ($count == -1) ) {
 +                if( ($count===false) || ($count == -1) ) {
 +                echo "count=$count\n";
                      //  Preserve the error generated by last() and pass()
                      return false;
                  } else
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/10587>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list