diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2019-06-28 14:48:08 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2019-06-28 14:48:08 +0200 |
commit | 0a0ca984f0b45d874937ff47a4f7a77d530e7a10 (patch) | |
tree | 7084f844351c467d3d1c1cc9d9b83a93428a01e3 | |
parent | b4121f49306c0c411ad3f99a5dc5665a3a9ddc87 (diff) | |
parent | ca6f41aa5a15a44f841e42c7255294d521c95d5d (diff) | |
download | php-git-0a0ca984f0b45d874937ff47a4f7a77d530e7a10.tar.gz |
Merge branch 'PHP-7.4'
-rw-r--r-- | ext/mysqli/mysqli_api.c | 4 | ||||
-rw-r--r-- | ext/mysqli/tests/mysqli_connect_oo_warnings.phpt | 2 | ||||
-rw-r--r-- | ext/opcache/Optimizer/sccp.c | 1 | ||||
-rw-r--r-- | sapi/phpdbg/phpdbg.c | 8 | ||||
-rw-r--r-- | sapi/phpdbg/phpdbg_opcode.h | 2 |
5 files changed, 8 insertions, 9 deletions
diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c index d6a67e8cb9..9ed9df046c 100644 --- a/ext/mysqli/mysqli_api.c +++ b/ext/mysqli/mysqli_api.c @@ -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 { diff --git a/ext/mysqli/tests/mysqli_connect_oo_warnings.phpt b/ext/mysqli/tests/mysqli_connect_oo_warnings.phpt index e5a1b0fc99..8204d0f1da 100644 --- a/ext/mysqli/tests/mysqli_connect_oo_warnings.phpt +++ b/ext/mysqli/tests/mysqli_connect_oo_warnings.phpt @@ -44,7 +44,7 @@ new mysqli() --EXPECTF-- 1) bail -Warning: mysqli::mysqli(): (HY000/200%d): %s +Warning: mysqli::__construct(): (HY000/200%d): %s 2) be quiet %s(%d) "%s" int(200%d) diff --git a/ext/opcache/Optimizer/sccp.c b/ext/opcache/Optimizer/sccp.c index da829e2860..8cbe72645c 100644 --- a/ext/opcache/Optimizer/sccp.c +++ b/ext/opcache/Optimizer/sccp.c @@ -2326,6 +2326,7 @@ static int try_remove_definition(sccp_ctx *ctx, int var_num, zend_ssa_var *var, if (opline->opcode == ZEND_DO_ICALL) { removed_ops = remove_call(ctx, opline, ssa_op); } else if (opline->opcode == ZEND_TYPE_CHECK + && ssa_op->op1_use >= 0 && !value_known(&ctx->values[ssa_op->op1_use])) { /* For TYPE_CHECK we may compute the result value without knowing the * operand, based on type inference information. Make sure the operand is diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c index 463749ea3a..67cefc75f2 100644 --- a/sapi/phpdbg/phpdbg.c +++ b/sapi/phpdbg/phpdbg.c @@ -449,14 +449,12 @@ static PHP_FUNCTION(phpdbg_start_oplog) if (!prev) { PHPDBG_G(oplog_arena) = zend_arena_create(64 * 1024); - - PHPDBG_G(oplog_cur) = ((phpdbg_oplog_entry *) zend_arena_alloc(&PHPDBG_G(oplog_arena), sizeof(phpdbg_oplog_entry))) + 1; - PHPDBG_G(oplog_cur)->next = NULL; } PHPDBG_G(oplog_list) = emalloc(sizeof(phpdbg_oplog_list)); PHPDBG_G(oplog_list)->prev = prev; - PHPDBG_G(oplog_list)->start = PHPDBG_G(oplog_cur); + PHPDBG_G(oplog_cur) = &PHPDBG_G(oplog_list)->start; + PHPDBG_G(oplog_cur)->next = NULL; } static zend_always_inline zend_bool phpdbg_is_ignored_opcode(zend_uchar opcode) { @@ -633,7 +631,7 @@ static PHP_FUNCTION(phpdbg_end_oplog) return; } - cur = PHPDBG_G(oplog_list)->start; + cur = PHPDBG_G(oplog_list)->start.next; prev = PHPDBG_G(oplog_list)->prev; efree(PHPDBG_G(oplog_list)); diff --git a/sapi/phpdbg/phpdbg_opcode.h b/sapi/phpdbg/phpdbg_opcode.h index f84862fbae..b9e2fa506c 100644 --- a/sapi/phpdbg/phpdbg_opcode.h +++ b/sapi/phpdbg/phpdbg_opcode.h @@ -40,7 +40,7 @@ struct _phpdbg_oplog_entry { typedef struct _phpdbg_oplog_list phpdbg_oplog_list; struct _phpdbg_oplog_list { phpdbg_oplog_list *prev; - phpdbg_oplog_entry *start; + phpdbg_oplog_entry start; /* Only "next" member used. */ }; #endif /* PHPDBG_OPCODE_H */ |