summaryrefslogtreecommitdiff
path: root/ext/pdo_firebird
diff options
context:
space:
mode:
authorGeorge Peter Banyard <girgias@php.net>2021-01-19 12:54:42 +0000
committerGeorge Peter Banyard <girgias@php.net>2021-01-19 12:55:07 +0000
commitb44e29f8430189914ad4047176527918f80b935c (patch)
tree0573ad737518b18635be497fe651b45a825c4565 /ext/pdo_firebird
parent424b4802d2b3f3682ccef86bcb4a162832a4c12f (diff)
downloadphp-git-b44e29f8430189914ad4047176527918f80b935c.tar.gz
php_pdo_register_driver() might fail
Therefore correctly report failure in MINIT for the drivers which didn't.
Diffstat (limited to 'ext/pdo_firebird')
-rw-r--r--ext/pdo_firebird/pdo_firebird.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/pdo_firebird/pdo_firebird.c b/ext/pdo_firebird/pdo_firebird.c
index 086b7cab5f..29b8bc85a7 100644
--- a/ext/pdo_firebird/pdo_firebird.c
+++ b/ext/pdo_firebird/pdo_firebird.c
@@ -58,7 +58,9 @@ PHP_MINIT_FUNCTION(pdo_firebird) /* {{{ */
REGISTER_PDO_CLASS_CONST_LONG("FB_ATTR_TIME_FORMAT", (zend_long) PDO_FB_ATTR_TIME_FORMAT);
REGISTER_PDO_CLASS_CONST_LONG("FB_ATTR_TIMESTAMP_FORMAT", (zend_long) PDO_FB_ATTR_TIMESTAMP_FORMAT);
- php_pdo_register_driver(&pdo_firebird_driver);
+ if (FAILURE == php_pdo_register_driver(&pdo_firebird_driver)) {
+ return FAILURE;
+ }
#ifdef ZEND_SIGNALS
/* firebird replaces some signals at runtime, suppress warnings. */