Skip to content

Commit b8e9c5b

Browse files
committed
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. Closes GH-15066.
1 parent a18df90 commit b8e9c5b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

NEWS

+3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ PHP NEWS
2121
. Fixed bug GH-13817 (Segmentation fault for enabled observers after pass 4).
2222
(Bob)
2323

24+
- PDO_Firebird:
25+
. Fix bogus fallthrough path in firebird_handle_get_attribute(). (nielsdos)
26+
2427
- Soap:
2528
. Fixed bug #55639 (Digest autentication dont work). (nielsdos)
2629

ext/pdo_firebird/firebird_driver.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -977,8 +977,7 @@ static int firebird_handle_get_attribute(pdo_dbh_t *dbh, zend_long attr, zval *v
977977
ZVAL_STRING(val, tmp);
978978
return 1;
979979
}
980-
/* TODO Check this is correct? */
981-
ZEND_FALLTHROUGH;
980+
return -1;
982981

983982
case PDO_ATTR_FETCH_TABLE_NAMES:
984983
ZVAL_BOOL(val, H->fetch_table_names);

0 commit comments

Comments
 (0)