]> granicus.if.org Git - php/commitdiff
Fix compilation errors when building against libmysql
authorSebastian Pop <spop@amazon.com>
Fri, 21 Jun 2019 07:15:35 +0000 (07:15 +0000)
committerNikita Popov <nikita.ppv@gmail.com>
Fri, 28 Jun 2019 12:46:12 +0000 (14:46 +0200)
Closes GH-4316.

ext/mysqli/mysqli_api.c

index 93071c2d0c5d7a690f2e8847802be147e6325a4d..bffb6957959a78e0f99129af1fdff99a56ae66b6 100644 (file)
@@ -970,7 +970,7 @@ void mysqli_stmt_fetch_libmysql(INTERNAL_FUNCTION_PARAMETERS)
                        zval *result;
                        /* it must be a reference, isn't it? */
                        if (Z_ISREF(stmt->result.vars[i])) {
-                               result = stmt->result.vars[i];
+                               result = &stmt->result.vars[i];
                        } else {
                                continue; // but be safe ...
                        }
@@ -1083,7 +1083,7 @@ void mysqli_stmt_fetch_libmysql(INTERNAL_FUNCTION_PARAMETERS)
                                                break;
                                }
                        } else {
-                               ZEND_TRY_REF_ASSIGN_NULL(result);
+                               ZEND_TRY_ASSIGN_REF_NULL(result);
                        }
                }
        } else {