]> granicus.if.org Git - php/commitdiff
- Allow default fetch mode to contain fetch flags
authorMarcus Boerger <helly@php.net>
Sun, 27 Feb 2005 22:48:14 +0000 (22:48 +0000)
committerMarcus Boerger <helly@php.net>
Sun, 27 Feb 2005 22:48:14 +0000 (22:48 +0000)
ext/pdo/pdo_stmt.c

index 59e7a0b5c32517e9bb922d5a779b2d43a96f5cd5..ed8c8e1f1cd4da96e62731bf3c0bd3e70717d332 100755 (executable)
@@ -967,7 +967,8 @@ static int pdo_stmt_verify_mode(pdo_stmt_t *stmt, int mode, int fetch_all TSRMLS
        mode = mode & ~PDO_FETCH_FLAGS;
 
        if (mode == PDO_FETCH_USE_DEFAULT) {
-               mode = stmt->default_fetch_type;
+               flags = stmt->default_fetch_type & PDO_FETCH_FLAGS;
+               mode = stmt->default_fetch_type & ~PDO_FETCH_FLAGS;
        }
 
        switch(mode) {