summaryrefslogtreecommitdiff
path: root/ext/standard/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/string.c')
-rw-r--r--ext/standard/string.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/standard/string.c b/ext/standard/string.c
index cc52e0ba77..9ec1dde4d4 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -4178,8 +4178,11 @@ PHP_FUNCTION(parse_str)
if (argCount == 1) {
zval tmp;
- Z_ARRVAL(tmp) = EG(active_symbol_table);
+ if (!EG(active_symbol_table)) {
+ zend_rebuild_symbol_table(TSRMLS_C);
+ }
+ Z_ARRVAL(tmp) = EG(active_symbol_table);
sapi_module.treat_data(PARSE_STRING, res, &tmp TSRMLS_CC);
} else {
/* Clear out the array that was passed in. */