[PHP-DEV] PHP 4.0 Bug #4004 Updated: imap_errors() says it returns Array. I find String using gettype() on result. From: Bug Database (php-dev <email protected>)
Date: 04/01/00

ID: 4004
Updated by: sterling
Reported By: rdoust <email protected>
Status: Closed
Bug Type: Misbehaving function
Assigned To:
Comments:

imap_errors should return an array, from the source of PHP:

void php3_imap_errors(INTERNAL_FUNCTION_PARAMETERS)
{
  ERRORLIST *cur=NIL;
  
  int arg_count = ARG_COUNT(ht);
  
  if (arg_count > 0) {
    WRONG_PARAM_COUNT;
  }
  
  if (imap_errorstack == NIL) {
    RETURN_FALSE;
  }
  
  array_init(return_value);
  cur = imap_errorstack;
  while (cur != NIL) {
    add_next_index_string(return_value,cur->LTEXT,1);
    cur = cur->next;
  }
  mail_free_errorlist(&imap_errorstack);
  imap_errorstack = NIL;
}

That is why I am going to move this to Misbehaving Functions.

Full Bug description available at: http://bugs.php.net/version4/?id=4004

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>