zend_file_handle *prepend_file_p, *append_file_p;
zend_file_handle prepend_file, append_file;
char *old_cwd;
+ int retval = 0;
EG(exit_status) = 0;
if (php_handle_special_queries(TSRMLS_C)) {
} else {
append_file_p = NULL;
}
- zend_execute_scripts(ZEND_REQUIRE TSRMLS_CC, NULL, 3, prepend_file_p, primary_file, append_file_p);
+ retval = (zend_execute_scripts(ZEND_REQUIRE TSRMLS_CC, NULL, 3, prepend_file_p, primary_file, append_file_p) == SUCCESS);
} zend_end_try();
if (old_cwd[0] != '\0') {
VCWD_CHDIR(old_cwd);
}
free_alloca(old_cwd);
- return EG(exit_status);
+ return retval;
}
/* }}} */
switch (behavior) {
case PHP_MODE_STANDARD:
- exit_status = php_execute_script(&file_handle TSRMLS_CC);
+ if (php_execute_script(&file_handle TSRMLS_CC)) {
+ exit_status = EG(exit_status);
+ } else {
+ exit_status = -1;
+ }
break;
case PHP_MODE_LINT:
PG(during_request_startup) = 0;
switch (behavior) {
case PHP_MODE_STANDARD:
- exit_status = php_execute_script(&file_handle TSRMLS_CC);
+ if (php_execute_script(&file_handle TSRMLS_CC)) {
+ exit_status = EG(exit_status);
+ } else {
+ exit_status = -1;
+ }
break;
case PHP_MODE_LINT:
PG(during_request_startup) = 0;
switch ( lpCB->dwBehavior ) {
case PHP_MODE_STANDARD:
- iRet = ( php_execute_script( &file_handle TSRMLS_CC ) == SUCCESS ) ?
+ iRet = ( php_execute_script( &file_handle TSRMLS_CC ) ) ?
PIAPI_COMPLETED : PIAPI_ERROR;
break;
case PHP_MODE_HIGHLIGHT: {