From c470d59f07a8d71c13e0edf6082fac24b4851eee Mon Sep 17 00:00:00 2001 From: v-kaywon Date: Fri, 30 Jun 2017 09:38:01 -0700 Subject: [PATCH] change back ordering for checking stmt != NULL --- source/pdo_sqlsrv/pdo_dbh.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/pdo_sqlsrv/pdo_dbh.cpp b/source/pdo_sqlsrv/pdo_dbh.cpp index 7afa215f..8d4ad86c 100644 --- a/source/pdo_sqlsrv/pdo_dbh.cpp +++ b/source/pdo_sqlsrv/pdo_dbh.cpp @@ -1343,7 +1343,7 @@ int pdo_sqlsrv_dbh_quote( pdo_dbh_t* dbh, const char* unquoted, size_t unquoted_ } // get the placeholder at the current position in driver_stmt->placeholders ht zval* placeholder = NULL; - if (( stmt->bound_params != NULL && placeholder = zend_hash_get_current_data( driver_stmt->placeholders )) != NULL && zend_hash_move_forward( driver_stmt->placeholders ) == SUCCESS ) { + if (( placeholder = zend_hash_get_current_data( driver_stmt->placeholders )) != NULL && zend_hash_move_forward( driver_stmt->placeholders ) == SUCCESS && stmt->bound_params != NULL ) { pdo_bound_param_data* param = NULL; if ( Z_TYPE_P( placeholder ) == IS_STRING ) { param = reinterpret_cast( zend_hash_find_ptr( stmt->bound_params, Z_STR_P( placeholder )));