[php-src] PR #22430: Fix invalid Firebird isolation level proceeding with the connection
| From: | iliaal | Date: | Wed, 24 Jun 2026 11:22:20 +0000 |
| Subject: | [php-src] PR #22430: Fix invalid Firebird isolation level proceeding with the connection | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-36596@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/22430
Author: iliaal
pdo_firebird_handle_factory() raised a ValueError for an out-of-range TRANSACTION_ISOLATION_LEVEL
but only set ret = 0; zend_value_error() queues the exception without aborting, so control fell
through into the isc_attach_database() block, opened the connection and overwrote ret with 1. The
constructor then returned success with a pending ValueError and a live handle whose isolation level
was never selected. Break out of the attach block when an exception is pending and skip the trailing
fb_interpret() throw so the ValueError is the sole result; the existing !ret path runs
firebird_handle_closer(), which is NULL-guarded on every field and safely frees the unused handle.
Note: built against FreeBSD/Firebird is unavailable locally, so this was not compiled here; the
change is two EG(exception) guards.