diff --git a/index.php b/index.php index dfcb422d5244..62f1d24a075c 100644 --- a/index.php +++ b/index.php @@ -541,7 +541,7 @@ * Check for existence of config directory which should not exist in * production environment. */ -if (file_exists('config')) { +if (@file_exists('config')) { trigger_error( __( 'Directory [code]config[/code], which is used by the setup script, ' . @@ -653,7 +653,7 @@ * * The data file is created while creating release by ./scripts/remove-incomplete-mo */ -if (file_exists('libraries/language_stats.inc.php')) { +if (@file_exists('libraries/language_stats.inc.php')) { include 'libraries/language_stats.inc.php'; /* * This message is intentionally not translated, because we're diff --git a/libraries/Config.php b/libraries/Config.php index b770c2fd59f7..a929aacef6ee 100644 --- a/libraries/Config.php +++ b/libraries/Config.php @@ -763,7 +763,7 @@ public function checkHTTP($link, $get_body = false) public function loadDefaults() { $cfg = array(); - if (! file_exists($this->default_source)) { + if (! @file_exists($this->default_source)) { $this->error_config_default_file = true; return false; } diff --git a/libraries/LanguageManager.php b/libraries/LanguageManager.php index 31fb6e2700ef..b49f19320ed3 100644 --- a/libraries/LanguageManager.php +++ b/libraries/LanguageManager.php @@ -576,7 +576,7 @@ public function listLocaleDir() . '/LC_MESSAGES/phpmyadmin.mo'; if ($file != "." && $file != ".." - && file_exists($path) + && @file_exists($path) ) { $result[] = $file; } diff --git a/libraries/file_listing.lib.php b/libraries/file_listing.lib.php index 478dec36956a..097fc8851188 100644 --- a/libraries/file_listing.lib.php +++ b/libraries/file_listing.lib.php @@ -16,7 +16,7 @@ */ function PMA_getDirContent($dir, $expression = '') { - if (!file_exists($dir) || !($handle = @opendir($dir))) { + if (!@file_exists($dir) || !($handle = @opendir($dir))) { return false; } diff --git a/libraries/plugins/auth/AuthenticationCookie.php b/libraries/plugins/auth/AuthenticationCookie.php index a4f6ddcc2aef..3df6a22d74b9 100644 --- a/libraries/plugins/auth/AuthenticationCookie.php +++ b/libraries/plugins/auth/AuthenticationCookie.php @@ -101,7 +101,7 @@ public function auth() $header->disableMenuAndConsole(); $header->disableWarnings(); - if (file_exists(CUSTOM_HEADER_FILE)) { + if (@file_exists(CUSTOM_HEADER_FILE)) { include CUSTOM_HEADER_FILE; } echo ' @@ -249,7 +249,7 @@ public function auth() echo ''; } echo ''; - if (file_exists(CUSTOM_FOOTER_FILE)) { + if (@file_exists(CUSTOM_FOOTER_FILE)) { include CUSTOM_FOOTER_FILE; } if (! defined('TESTSUITE')) { diff --git a/libraries/plugins/auth/AuthenticationHttp.php b/libraries/plugins/auth/AuthenticationHttp.php index 170d7c1e0e92..8123bdc49fe5 100644 --- a/libraries/plugins/auth/AuthenticationHttp.php +++ b/libraries/plugins/auth/AuthenticationHttp.php @@ -101,7 +101,7 @@ public function authForm() ); $response->addHTML(''); - if (file_exists(CUSTOM_FOOTER_FILE)) { + if (@file_exists(CUSTOM_FOOTER_FILE)) { include CUSTOM_FOOTER_FILE; } diff --git a/libraries/plugins/auth/swekey/swekey.auth.lib.php b/libraries/plugins/auth/swekey/swekey.auth.lib.php index 493ab3278c7d..78d90099d6a1 100644 --- a/libraries/plugins/auth/swekey/swekey.auth.lib.php +++ b/libraries/plugins/auth/swekey/swekey.auth.lib.php @@ -22,7 +22,7 @@ function Swekey_Auth_check() $_SESSION['SWEKEY'] = array(); } - $_SESSION['SWEKEY']['ENABLED'] = (! empty($confFile) && file_exists($confFile)); + $_SESSION['SWEKEY']['ENABLED'] = (! empty($confFile) && @file_exists($confFile)); // Load the swekey.conf file the first time if ($_SESSION['SWEKEY']['ENABLED'] @@ -167,7 +167,7 @@ function timedCheck() // echo "\n"; } - if (file_exists($caFile)) { + if (@file_exists($caFile)) { Swekey_SetCAFile($caFile); } elseif (! empty($caFile) && (substr($_SESSION['SWEKEY']['CONF_SERVER_CHECK'], 0, 8) == "https://") diff --git a/libraries/plugins/export/ExportPdf.php b/libraries/plugins/export/ExportPdf.php index b0e59c72e989..ccf8c9c69e4c 100644 --- a/libraries/plugins/export/ExportPdf.php +++ b/libraries/plugins/export/ExportPdf.php @@ -19,7 +19,7 @@ /** * Skip the plugin if TCPDF is not available. */ -if (!file_exists(TCPDF_INC)) { +if (!@file_exists(TCPDF_INC)) { $GLOBALS['skip_import'] = true; return; } diff --git a/libraries/plugins/schema/pdf/PdfRelationSchema.php b/libraries/plugins/schema/pdf/PdfRelationSchema.php index 62a47227f964..809da7753257 100644 --- a/libraries/plugins/schema/pdf/PdfRelationSchema.php +++ b/libraries/plugins/schema/pdf/PdfRelationSchema.php @@ -14,7 +14,7 @@ /** * Skip the plugin if TCPDF is not available. */ -if (! file_exists(TCPDF_INC)) { +if (! @file_exists(TCPDF_INC)) { $GLOBALS['skip_import'] = true; return; }