Skip to content

Commit 8332ab4

Browse files
committed
Spit out errors
1 parent a13252b commit 8332ab4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

sapi/cgi/cgi_main.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,13 @@ any .htaccess restrictions anywhere on your site you can leave doc_root undefine
748748
exit_status = php_execute_script(&file_handle CLS_CC ELS_CC PLS_CC);
749749
break;
750750
case PHP_MODE_LINT:
751+
PG(during_request_startup) = 0;
751752
exit_status = php_lint_script(&file_handle CLS_CC ELS_CC PLS_CC);
753+
if (exit_status==SUCCESS) {
754+
zend_printf("No syntax errors detected in %s\n", file_handle.filename);
755+
} else {
756+
zend_printf("Errors parsing %s\n", file_handle.filename);
757+
}
752758
break;
753759
case PHP_MODE_HIGHLIGHT:
754760
{

0 commit comments

Comments
 (0)