summaryrefslogtreecommitdiff
path: root/Zend/zend.c
diff options
context:
space:
mode:
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);
}
}