Browse Source

MFH: fix #35430 (PDO crashes on incorrect FETCH_FUNC use)

PHP-5.1
Antony Dovgal 21 years ago
parent
commit
6543134dea
  1. 3
      NEWS
  2. 4
      ext/pdo/pdo_stmt.c

3
NEWS

@ -1,5 +1,8 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 200?, PHP 5.1.2
- Fixed bug #35430 (PDO crashes on incorrect FETCH_FUNC use). (Tony)
28 Nov 2005, PHP 5.1.1
- Disabled native date class to prevent pear::date conflict. (Ilia)
- Changed reflection constants be both PHP and class constants. (Johannes)

4
ext/pdo/pdo_stmt.c

@ -1353,13 +1353,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:

Loading…
Cancel
Save