diff options
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | Zend/zend_compile.c | 10 |
2 files changed, 10 insertions, 2 deletions
@@ -5,6 +5,8 @@ PHP NEWS - Core: . Implemented FR #64744 (Differentiate between member function call on a null and non-null, non-objects). (Boro Sitnikovski) + . Fixed bug #67436 (Autoloader isn't called if two method definitions don't + match). (Bob) . Fixed bug #66622 (Closures do not correctly capture the late bound class (static::) in some cases). (Levi Morrison) . Fixed bug #67390 (insecure temporary file use in the configure script). diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index beb53402ba..f1c8a678ca 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -3461,8 +3461,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, 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; @@ -3487,6 +3490,9 @@ static char * zend_get_function_declaration(zend_function *fptr TSRMLS_DC) /* {{ } else if (Z_TYPE_P(zv) == IS_ARRAY) { memcpy(offset, "Array", 5); offset += 5; + } else if (Z_TYPE_P(zv) == IS_CONSTANT_AST) { + memcpy(offset, "<expression>", 12); + offset += 12; } else { zend_make_printable_zval(zv, &zv_copy, &use_copy); REALLOC_BUF_IF_EXCEED(buf, offset, length, Z_STRLEN(zv_copy)); |