Bug #17999: imap_last_error() does not return anything

From: Date: Wed, 26 Jun 2002 18:06:53 +0000
Subject: Bug #17999: imap_last_error() does not return anything
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-12142@lists.php.net to get a copy of this message
From:             tomas.styblo@jet2web.cz
Operating system: FreeBSD 4.5
PHP version:      4.2.1
PHP Bug Type:     IMAP related
Bug description:  imap_last_error() does not return anything

In PHP 4.2.1, the imap_last_error() function does not work anymore, when
related imap_open() is prefixed with "@". It does not return anything.
Simple test case:

<?
$username = 'user';
$password = 'passwd';
$host = 'host';   # some nonexistent host
$port = 143;
$proto = 'imap';

if ($con = @imap_open('{'.$host.':'.$port.'/'.$proto.'}',
$username,
$password, OP_HALFOPEN)) {
    print "Connected\n";
}
else {
    $err = imap_last_error();
    print "Error: $err\n";
}
?>

-- 
Edit bug report at http://bugs.php.net/?id=17999&edit=1
-- 
Fixed in CVS:        http://bugs.php.net/fix.php?id=17999&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=17999&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=17999&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=17999&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=17999&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=17999&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=17999&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=17999&r=submittedtwice
register_globals:    http://bugs.php.net/fix.php?id=17999&r=globals



Thread (2 messages)

« previous php.bugs (#12142) next »