From: George Peter Banyard Date: Fri, 25 Sep 2020 13:54:25 +0000 (+0100) Subject: Fix logic error in PDO X-Git-Tag: php-7.3.24RC1~36 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4dfbf07644ba68486b66662d7c74b660a5b80572;p=php Fix logic error in PDO --- diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index f010d0453b..a322cd5761 100644 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -1873,7 +1873,8 @@ int pdo_stmt_setup_fetch_mode(INTERNAL_FUNCTION_PARAMETERS, pdo_stmt_t *stmt, in mode = Z_LVAL(args[skip]); flags = mode & PDO_FETCH_FLAGS; - retval = pdo_stmt_verify_mode(stmt, mode, 0); + /* pdo_stmt_verify_mode() returns a boolean value */ + retval = pdo_stmt_verify_mode(stmt, mode, 0) ? SUCCESS : FAILURE; } }