]> granicus.if.org Git - php/commitdiff
Fix bug #67436
authorBob Weinand <bobwei9@hotmail.com>
Sun, 15 Jun 2014 20:18:25 +0000 (22:18 +0200)
committerBob Weinand <bobwei9@hotmail.com>
Sun, 15 Jun 2014 20:18:25 +0000 (22:18 +0200)
Zend/zend_compile.c

index f26766964aa4c3936d3697fd55cc22375e9b6bf9..519227cd7a8ebb168ec5459ba5b6edec62d3dc6a 100644 (file)
@@ -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 {