File tree Expand file tree Collapse file tree
phpmyfaq/assets/src/configuration Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -75,12 +75,15 @@ export const handleUpdateInformation = async (): Promise<void> => {
7575 const errorMessage = await response . json ( ) ;
7676 errorText = errorMessage . message || errorMessage . error || 'Update check failed' ;
7777 } else {
78- errorText = await response . text ( ) ;
79- if ( ! errorText || errorText === 'Not Found' ) {
78+ const rawText = await response . text ( ) ;
79+ if ( ! rawText || rawText === 'Not Found' || rawText . trimStart ( ) . startsWith ( '<' ) ) {
8080 errorText =
81- 'The requested resource was not found on the server. ' +
82- 'Please check your server configuration, if you use Apache, the RewriteBase in your .htaccess ' +
83- 'configuration. If you use nginx, please check your nginx rewrite configuration.' ;
81+ 'The server returned an error (HTTP ' +
82+ response . status +
83+ '). Please check your server configuration: if you use Apache, verify the RewriteBase in your ' +
84+ '.htaccess matches your installation path. If you use nginx, check your rewrite configuration.' ;
85+ } else {
86+ errorText = rawText ;
8487 }
8588 }
8689 const alert = document . getElementById ( 'phpmyfaq-update-check-alert' ) as HTMLElement | null ;
You can’t perform that action at this time.
0 commit comments