Skip to content

Commit

Permalink
Fix javascript console errors in install.php
Browse files Browse the repository at this point in the history
This caused by core.php redirecting to install.php when config_inc.php
does not exist, when attempting to load the dynamically built javascript
files.

Fixes #33756
  • Loading branch information
dregad committed Feb 17, 2024
1 parent 9a8f127 commit 6da6fb0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core.php
Expand Up @@ -137,6 +137,12 @@
exit( 1 );
}

# Do not load Core for dynamic javascript files when MantisBT is not installed
if( isset( $_SERVER['SCRIPT_NAME'] ) && ( 0 < strpos( $_SERVER['SCRIPT_NAME'], 'javascript' ) ) ) {
http_response_code( HTTP_STATUS_NO_CONTENT );
exit;
}

if( !( isset( $_SERVER['SCRIPT_NAME'] ) && ( 0 < strpos( $_SERVER['SCRIPT_NAME'], 'admin' ) ) ) ) {
header( 'Content-Type: text/html' );
# Temporary redirect (307) instead of Found (302) default
Expand Down

0 comments on commit 6da6fb0

Please sign in to comment.