iliaa           Thu Dec 15 22:33:02 2005 EDT

  Modified files:              (Branch: PHP_5_1)
    /php-src/ext/pdo    pdo_stmt.c 
    /php-src    NEWS 
  Log:
  Fixed bug #35694 (Improved error message for invalid fetch mode).
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/pdo/pdo_stmt.c?r1=1.118.2.26&r2=1.118.2.27&diff_format=u
Index: php-src/ext/pdo/pdo_stmt.c
diff -u php-src/ext/pdo/pdo_stmt.c:1.118.2.26 
php-src/ext/pdo/pdo_stmt.c:1.118.2.27
--- php-src/ext/pdo/pdo_stmt.c:1.118.2.26       Tue Dec  6 02:25:27 2005
+++ php-src/ext/pdo/pdo_stmt.c  Thu Dec 15 22:33:01 2005
@@ -18,7 +18,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: pdo_stmt.c,v 1.118.2.26 2005/12/06 02:25:27 sniper Exp $ */
+/* $Id: pdo_stmt.c,v 1.118.2.27 2005/12/15 22:33:01 iliaa Exp $ */
 
 /* The PDO Statement Handle Class */
 
@@ -1798,13 +1798,8 @@
                        break;
                
                default:
-                       if ((mode & ~PDO_FETCH_FLAGS) < PDO_FETCH__MAX && (mode 
& ~PDO_FETCH_FLAGS) >= 0) {
-                               pdo_raise_impl_error(stmt->dbh, stmt, "22003", 
"unhandled mode; this is a PDO bug, please report it" TSRMLS_CC);
-                       } else {
-                               pdo_raise_impl_error(stmt->dbh, stmt, "22003", 
"mode is out of range" TSRMLS_CC);
-                       }
-                       efree(args);
-                       return FAILURE;
+                       pdo_raise_impl_error(stmt->dbh, stmt, "22003", "Invalid 
fetch mode specified" TSRMLS_CC);
+                       goto fail_out;
        }
 
        stmt->default_fetch_type = mode;
http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.293&r2=1.2027.2.294&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.293 php-src/NEWS:1.2027.2.294
--- php-src/NEWS:1.2027.2.293   Thu Dec 15 22:15:01 2005
+++ php-src/NEWS        Thu Dec 15 22:33:02 2005
@@ -26,6 +26,7 @@
 - Fixed many bugs in OCI8. (Tony)
 - Fixed crash and leak in mysqli when using 4.1.x client libraries and
   connecting to 5.x server. (Andrey)
+- Fixed bug #35694 (Improved error message for invalid fetch mode). (Ilia)
 - Fixed bug #35690 (pack() tries to allocate huge memory block when packing 
   float values to strings). (Tony)
 - Fixed bug #35655 (whitespace following end of heredoc is lost). (Ilia)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to