summaryrefslogtreecommitdiffstats
path: root/174.patch
diff options
context:
space:
mode:
Diffstat (limited to '174.patch')
-rw-r--r--174.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/174.patch b/174.patch
new file mode 100644
index 0000000..9c391bf
--- /dev/null
+++ b/174.patch
@@ -0,0 +1,38 @@
+From 1c0d5b08852e1fd69ad7110f4cae53ecac26de3c Mon Sep 17 00:00:00 2001
+From: Remi Collet <remi@remirepo.net>
+Date: Wed, 2 Sep 2020 09:01:23 +0200
+Subject: [PATCH] fix for 8.0.0beta3
+
+---
+ ast.c | 17 ++++++++---------
+ 1 file changed, 8 insertions(+), 9 deletions(-)
+
+diff --git a/ast.c b/ast.c
+index eeb6b5a..2004d7d 100644
+--- a/ast.c
++++ b/ast.c
+@@ -329,16 +329,15 @@ static zend_ast *get_ast(zend_string *code, zend_arena **ast_arena, char *filena
+ CG(in_compilation) = 1;
+
+ zend_save_lexical_state(&original_lex_state);
+- if (zend_prepare_string_for_scanning(&code_zv, filename) == SUCCESS) {
++ zend_prepare_string_for_scanning(&code_zv, filename);
++ CG(ast) = NULL;
++ CG(ast_arena) = zend_arena_create(1024 * 32);
++ LANG_SCNG(yy_state) = yycINITIAL;
++
++ if (zendparse() != 0) {
++ zend_ast_destroy(CG(ast));
++ zend_arena_destroy(CG(ast_arena));
+ CG(ast) = NULL;
+- CG(ast_arena) = zend_arena_create(1024 * 32);
+- LANG_SCNG(yy_state) = yycINITIAL;
+-
+- if (zendparse() != 0) {
+- zend_ast_destroy(CG(ast));
+- zend_arena_destroy(CG(ast_arena));
+- CG(ast) = NULL;
+- }
+ }
+
+ /* restore_lexical_state changes CG(ast) and CG(ast_arena) */