From 61ba7e15554455bb5c8b450b602c9291406157f9 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Mon, 22 Jul 2024 17:32:16 +0200 Subject: [PATCH] Fix bogus fallthrough path in firebird_handle_get_attribute() If getting the version fails, we should return -1 according to php_pdo_driver.h:259, not fall through to another attribute. --- ext/pdo_firebird/firebird_driver.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ext/pdo_firebird/firebird_driver.c b/ext/pdo_firebird/firebird_driver.c index 7dc40f510d459..03c9f1b7741c5 100644 --- a/ext/pdo_firebird/firebird_driver.c +++ b/ext/pdo_firebird/firebird_driver.c @@ -977,8 +977,7 @@ static int firebird_handle_get_attribute(pdo_dbh_t *dbh, zend_long attr, zval *v ZVAL_STRING(val, tmp); return 1; } - /* TODO Check this is correct? */ - ZEND_FALLTHROUGH; + return -1; case PDO_ATTR_FETCH_TABLE_NAMES: ZVAL_BOOL(val, H->fetch_table_names);