com php-src: Fix bug #67436: Zend/zend_compile.c

From: Date: Sun, 15 Jun 2014 20:18:25 +0000
Subject: com php-src: Fix bug #67436: Zend/zend_compile.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-78885@lists.php.net to get a copy of this message
Commit: ca29063da5599f463454578abe629bc21ab33b3b Author: Bob Weinand <bobwei9@hotmail.com> Sun, 15 Jun 2014 22:18:25 +0200 Parents: b053c4f4f6db57c7687e700de7aa4abadef2c128 Branches: PHP-5.4 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ca29063da5599f463454578abe629bc21ab33b3b Log: Fix bug #67436 Bugs: https://bugs.php.net/67436 Changed paths: M Zend/zend_compile.c Diff: diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index f267669..519227c 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -3150,8 +3150,11 @@ static char * zend_get_function_declaration(zend_function *fptr TSRMLS_DC) /* {{ *zv = *precv->op2.zv; zval_copy_ctor(zv); INIT_PZVAL(zv); - zval_update_constant_ex(&zv, (void*)1, fptr->common.scope TSRMLS_CC); - if (Z_TYPE_P(zv) == IS_BOOL) { + if (Z_TYPE_P(zv) == IS_CONSTANT) { + REALLOC_BUF_IF_EXCEED(buf, offset, length, Z_STRLEN_P(zv)); + memcpy(offset, Z_STRVAL_P(zv), Z_STRLEN_P(zv)); + offset += Z_STRLEN_P(zv); + } else if (Z_TYPE_P(zv) == IS_BOOL) { if (Z_LVAL_P(zv)) { memcpy(offset, "true", 4); offset += 4; @@ -3173,7 +3176,7 @@ static char * zend_get_function_declaration(zend_function *fptr TSRMLS_DC) /* {{ *(offset++) = '.'; } *(offset++) = '\''; - } else if (Z_TYPE_P(zv) == IS_ARRAY) { + } else if (Z_TYPE_P(zv) == IS_ARRAY || Z_TYPE_P(zv) == IS_CONSTANT_ARRAY) { memcpy(offset, "Array", 5); offset += 5; } else {

« previous php.cvs (#78885) next »