MFB51: Fixed bug #35694 (Improved error message for invalid fetch mode).

This commit is contained in:
Ilia Alshanetsky 2005-12-15 22:35:18 +00:00
parent 90b95eeb23
commit c64ae2f2c9

View file

@ -1742,13 +1742,8 @@ fail_out:
break; break;
default: default:
if ((mode & ~PDO_FETCH_FLAGS) < PDO_FETCH__MAX && (mode & ~PDO_FETCH_FLAGS) >= 0) { pdo_raise_impl_error(stmt->dbh, stmt, "22003", "Invalid fetch mode specified" TSRMLS_CC);
pdo_raise_impl_error(stmt->dbh, stmt, "22003", "unhandled mode; this is a PDO bug, please report it" TSRMLS_CC); goto fail_out;
} else {
pdo_raise_impl_error(stmt->dbh, stmt, "22003", "mode is out of range" TSRMLS_CC);
}
efree(args);
return FAILURE;
} }
stmt->default_fetch_type = mode; stmt->default_fetch_type = mode;