Skip to content

Commit 4fc7026

Browse files
committed
Convert warning to assetion in MySQL PDO driver
Closes GH-6120
1 parent 6082fd3 commit 4fc7026

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

ext/pdo_mysql/pdo_mysql.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,7 @@ static MYSQLND * pdo_mysql_convert_zv_to_mysqlnd(zval * zv)
6363
if (Z_TYPE_P(zv) == IS_OBJECT && instanceof_function(Z_OBJCE_P(zv), php_pdo_get_dbh_ce())) {
6464
pdo_dbh_t * dbh = Z_PDO_DBH_P(zv);
6565

66-
if (!dbh) {
67-
php_error_docref(NULL, E_WARNING, "Failed to retrieve handle from object store");
68-
return NULL;
69-
}
66+
ZEND_ASSERT(dbh);
7067

7168
if (dbh->driver != &pdo_mysql_driver) {
7269
php_error_docref(NULL, E_WARNING, "Provided PDO instance is not using MySQL but %s", dbh->driver->driver_name);

0 commit comments

Comments
 (0)