Skip to content

Commit

Permalink
Remove the public/show_config_errors.php file
Browse files Browse the repository at this point in the history
A better and safer way of showing the configuration errors should be
developed.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
  • Loading branch information
MauricioFauth committed Jul 28, 2023
1 parent a295159 commit 44f7e93
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 57 deletions.
4 changes: 1 addition & 3 deletions libraries/classes/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -658,9 +658,7 @@ public function checkErrors(): void

$error = '[strong]' . __('Failed to read configuration file!') . '[/strong]'
. '[br][br]'
. __('This usually means there is a syntax error in it, please check any errors shown below.')
. '[br][br]'
. '[conferr]';
. __('This usually means there is a syntax error in it.');

throw new ConfigException(Sanitize::sanitizeMessage($error));
}
Expand Down
2 changes: 0 additions & 2 deletions libraries/classes/Sanitize.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,6 @@ public static function sanitizeMessage(string $message, bool $escape = false, bo
'[/doc]' => '</a>',
'[sup]' => '<sup>',
'[/sup]' => '</sup>',
'[conferr]' => '<iframe src="show_config_errors.php"><a href='
. '"show_config_errors.php">show_config_errors.php</a></iframe>',
// used in libraries/Util.php
'[dochelpicon]' => Html\Generator::getImage('b_help', __('Documentation')),
];
Expand Down
5 changes: 0 additions & 5 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -27580,11 +27580,6 @@ parameters:
count: 1
path: public/setup/index.php

-
message: "#^Parameter \\#1 \\$filename of function is_readable expects string, mixed given\\.$#"
count: 1
path: public/show_config_errors.php

-
message: "#^Call to function in_array\\(\\) requires parameter \\#3 to be set\\.$#"
count: 2
Expand Down
1 change: 0 additions & 1 deletion psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
<directory name="test/classes"/>
<directory name="test/selenium"/>
<file name="public/index.php"/>
<file name="public/show_config_errors.php"/>
<ignoreFiles>
<directory name="vendor"/>
<directory name="libraries/cache"/>
Expand Down
44 changes: 0 additions & 44 deletions public/show_config_errors.php

This file was deleted.

2 changes: 0 additions & 2 deletions scripts/check-release-excludes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,6 @@ validateExtension() {
;;
config.sample.inc.php)
;;
public/show_config_errors.php)
;;
*)
foundFileExt
;;
Expand Down

0 comments on commit 44f7e93

Please sign in to comment.