Permalink
Browse files

Fix reference to out-of-scope var

  • Loading branch information...
1 parent 83ef010 commit 27f6acee4f0f5bdae2f1a7023f8a86a9381feba8 @cataphract committed Jan 8, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 ext/standard/string.c
View
@@ -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);

0 comments on commit 27f6ace

Please sign in to comment.