summaryrefslogtreecommitdiff
path: root/Zend/zend.c
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2013-01-01 21:20:35 -0800
committerStanislav Malyshev <stas@php.net>2013-01-01 21:20:35 -0800
commit80a9a80a52d1eb0281cd2894be05c685e4d526a0 (patch)
treee9e3eafbe1e1000cba2c5ca90efd6c4c954fcbeb /Zend/zend.c
parent343a9199bbbf4f63b02099ceef27ef9881d8aa9f (diff)
parent36e19c9cab6cce4e44782563f590c6c4560fb187 (diff)
downloadphp-git-80a9a80a52d1eb0281cd2894be05c685e4d526a0.tar.gz
Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4: Bug #43177: If an eval() has a parse error, the overall exit status and return code should not be affected. fix NEWS Conflicts: main/main.c
Diffstat (limited to 'Zend/zend.c')
-rw-r--r--Zend/zend.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/Zend/zend.c b/Zend/zend.c
index dee55fcef1..d71d7cb5c8 100644
--- a/Zend/zend.c
+++ b/Zend/zend.c
@@ -1238,7 +1238,13 @@ ZEND_API void zend_error(int type, const char *format, ...) /* {{{ */
va_end(args);
if (type == E_PARSE) {
- EG(exit_status) = 255;
+ /* eval() errors do not affect exit_status */
+ if (!(EG(current_execute_data) &&
+ EG(current_execute_data)->opline &&
+ EG(current_execute_data)->opline->opcode == ZEND_INCLUDE_OR_EVAL &&
+ EG(current_execute_data)->opline->extended_value == ZEND_EVAL)) {
+ EG(exit_status) = 255;
+ }
zend_init_compiler_data_structures(TSRMLS_C);
}
}