From: Antony Dovgal Date: Thu, 1 Dec 2005 20:39:49 +0000 (+0000) Subject: tweak the fix X-Git-Tag: RELEASE_1_1_1~86 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=37eeba6f27f803fc6955c82a1099f924ba6d364e;p=php tweak the fix --- diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index 4414f9b1f5..021586b90b 100755 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -1069,13 +1069,13 @@ static int pdo_stmt_verify_mode(pdo_stmt_t *stmt, int mode, int fetch_all TSRMLS { int flags = mode & PDO_FETCH_FLAGS; + mode = mode & ~PDO_FETCH_FLAGS; + if (mode < 0 || mode > PDO_FETCH__MAX) { pdo_raise_impl_error(stmt->dbh, stmt, "HY000", "invalid fetch mode" TSRMLS_CC); return 0; } - mode = mode & ~PDO_FETCH_FLAGS; - if (mode == PDO_FETCH_USE_DEFAULT) { flags = stmt->default_fetch_type & PDO_FETCH_FLAGS; mode = stmt->default_fetch_type & ~PDO_FETCH_FLAGS;