Remove the public/show_config_errors.php file

A better and safer way of showing the configuration errors should be
developed.

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
Maurício Meneghini Fauth 2023-07-28 16:30:22 -03:00
parent a295159c64
commit 44f7e93b36
No known key found for this signature in database
GPG Key ID: 6A16FD38AFC89CC8
6 changed files with 1 additions and 57 deletions

View File

@ -658,9 +658,7 @@ class Config
$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));
}

View File

@ -191,8 +191,6 @@ class Sanitize
'[/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')),
];

View File

@ -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

View File

@ -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"/>

View File

@ -1,44 +0,0 @@
<?php
/**
* Simple wrapper just to enable error reporting and include config
*/
declare(strict_types=1);
if (! defined('ROOT_PATH')) {
// phpcs:disable PSR1.Files.SideEffects
define('ROOT_PATH', __DIR__ . DIRECTORY_SEPARATOR);
// phpcs:enable
}
// rfc2616 - Section 14.21
header('Expires: ' . gmdate(DATE_RFC1123));
// HTTP/1.1
header('Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0');
header('Pragma: no-cache'); // HTTP/1.0
// test case: exporting a database into a .gz file with Safari
// would produce files not having the current time
// (added this header for Safari but should not harm other browsers)
header('Last-Modified: ' . gmdate(DATE_RFC1123));
header('Content-Type: text/html; charset=utf-8');
// phpcs:disable PSR1.Files.SideEffects
define('PHPMYADMIN', true);
// phpcs:enable
require ROOT_PATH . 'libraries/constants.php';
// issue #16256 - This only works with php 8.0+
if (function_exists('error_reporting')) {
error_reporting(E_ALL);
}
/**
* Read config file.
*/
if (is_readable(CONFIG_FILE)) {
/** @psalm-suppress MissingFile */
include CONFIG_FILE;
}

View File

@ -202,8 +202,6 @@ validateExtension() {
;;
config.sample.inc.php)
;;
public/show_config_errors.php)
;;
*)
foundFileExt
;;