Skip to content

Commit

Permalink
Fix reference to out-of-scope var
Browse files Browse the repository at this point in the history
  • Loading branch information
cataphract committed Jan 8, 2013
1 parent 83ef010 commit 27f6ace
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ext/standard/string.c
Expand Up @@ -2864,6 +2864,7 @@ static struct strtr_array_data *php_strtr_array_prepare(int slen, HashTable *pat
int free_str = 0, int free_str = 0,
free_repl = 0; free_repl = 0;
strtr_h hash; strtr_h hash;
zval *tzv;
struct strtr_pat_node struct strtr_pat_node
*stored_node, *stored_node,
*cur_node; *cur_node;
Expand Down Expand Up @@ -2895,7 +2896,7 @@ static struct strtr_array_data *php_strtr_array_prepare(int slen, HashTable *pat
cur_node->next_alloc = NULL; cur_node->next_alloc = NULL;


if (Z_TYPE_PP(entry) != IS_STRING) { if (Z_TYPE_PP(entry) != IS_STRING) {
zval *tzv = *entry; tzv = *entry;
zval_addref_p(tzv); zval_addref_p(tzv);
SEPARATE_ZVAL(&tzv); SEPARATE_ZVAL(&tzv);
convert_to_string(tzv); convert_to_string(tzv);
Expand Down

0 comments on commit 27f6ace

Please sign in to comment.