]> granicus.if.org Git - php/commitdiff
Fix for with empty expression lists
authorNikita Popov <nikic@php.net>
Sat, 19 Jul 2014 11:21:12 +0000 (13:21 +0200)
committerNikita Popov <nikic@php.net>
Sat, 19 Jul 2014 11:21:12 +0000 (13:21 +0200)
Zend/zend_compile.c

index e30bb4d1235d767aab31fddc049dd55a153e179c..f5734563a00344422f2b23189582719355617ee2 100644 (file)
@@ -5653,7 +5653,12 @@ void zend_compile_do_while(zend_ast *ast TSRMLS_DC) {
 void zend_compile_expr_list(znode *result, zend_ast *ast TSRMLS_DC) {
        zend_uint i;
 
-       result->op_type = IS_UNUSED;
+       result->op_type = IS_CONST;
+       ZVAL_TRUE(&result->u.constant);
+
+       if (!ast) {
+               return;
+       }
        for (i = 0; i < ast->children; ++i) {
                zend_ast *expr_ast = ast->child[i];