php_pdo_register_driver() might fail

Therefore correctly report failure in MINIT for the drivers which didn't.
This commit is contained in:
George Peter Banyard 2021-01-19 12:54:42 +00:00
parent 424b4802d2
commit b44e29f843
5 changed files with 11 additions and 7 deletions

View file

@ -65,8 +65,7 @@ PHP_MINIT_FUNCTION(pdo_pgsql)
REGISTER_PDO_CLASS_CONST_LONG("PGSQL_TRANSACTION_INERROR", (zend_long)PGSQL_TRANSACTION_INERROR);
REGISTER_PDO_CLASS_CONST_LONG("PGSQL_TRANSACTION_UNKNOWN", (zend_long)PGSQL_TRANSACTION_UNKNOWN);
php_pdo_register_driver(&pdo_pgsql_driver);
return SUCCESS;
return php_pdo_register_driver(&pdo_pgsql_driver);
}
/* }}} */