]> granicus.if.org Git - php/commitdiff
MFB51: Fixed bug #35694 (Improved error message for invalid fetch mode).
authorIlia Alshanetsky <iliaa@php.net>
Thu, 15 Dec 2005 22:35:18 +0000 (22:35 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Thu, 15 Dec 2005 22:35:18 +0000 (22:35 +0000)
ext/pdo/pdo_stmt.c

index 75b51d950b5c3e2dcb3864b80cd34ac117e50e64..67cf741bab881aaadb42dbe3bbee77a6d7179836 100755 (executable)
@@ -1742,13 +1742,8 @@ fail_out:
                        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;