1
0
mirror of https://github.com/php/php-src.git synced 2026-04-29 11:13:36 +02:00

fix #35430 (PDO crashes on incorrect FETCH_FUNC use)

This commit is contained in:
Antony Dovgal
2005-11-27 20:56:46 +00:00
parent 0a1d459892
commit dc1d5122d1
+3 -1
View File
@@ -1305,13 +1305,15 @@ static PHP_METHOD(PDOStatement, fetchAll)
switch(ZEND_NUM_ARGS()) {
case 0:
case 1:
pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "no fetch function specified" TSRMLS_CC);
error = 1;
break;
case 3:
case 2:
stmt->fetch.func.function = arg2;
do_fetch_func_prepare(stmt TSRMLS_CC);
break;
}
do_fetch_func_prepare(stmt TSRMLS_CC);
break;
case PDO_FETCH_COLUMN: