Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix reference to out-of-scope var

  • Loading branch information...
commit 27f6acee4f0f5bdae2f1a7023f8a86a9381feba8 1 parent 83ef010
@cataphract authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  ext/standard/string.c
View
3  ext/standard/string.c
@@ -2864,6 +2864,7 @@ static struct strtr_array_data *php_strtr_array_prepare(int slen, HashTable *pat
int free_str = 0,
free_repl = 0;
strtr_h hash;
+ zval *tzv;
struct strtr_pat_node
*stored_node,
*cur_node;
@@ -2895,7 +2896,7 @@ static struct strtr_array_data *php_strtr_array_prepare(int slen, HashTable *pat
cur_node->next_alloc = NULL;
if (Z_TYPE_PP(entry) != IS_STRING) {
- zval *tzv = *entry;
+ tzv = *entry;
zval_addref_p(tzv);
SEPARATE_ZVAL(&tzv);
convert_to_string(tzv);
Please sign in to comment.
Something went wrong with that request. Please try again.