[php-src] Issue #10051: IMAP: there's no way to check if a IMAP\Connection is still open

From: Date: Mon, 05 Dec 2022 14:44:46 +0000
Subject: [php-src] Issue #10051: IMAP: there's no way to check if a IMAP\Connection is still open
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-243046@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/10051 Author: underdpt ### Description After #9309 (landed on 8.1.10) any attempt to close an already closed imap connection results on a ValueError: IMAP\Connection is already closed exception being thrown. imap_ping() also throws the same exception, so there's no way to check if a connection is still open (it might be closed by another piece of code, or because the server closed the connection while processing a long task). There should be a safe way to check if a IMAP\Connection is still open. Related: https://github.com/barbushin/php-imap/issues/680 ### PHP Version PHP >= 8.1.10 ### Operating System Ubuntu 22.04 / Windows 10&11

« previous php.bugs (#243046) next »