diff --git a/index.php b/index.php index dfcb422d52..62f1d24a07 100644 --- a/index.php +++ b/index.php @@ -541,7 +541,7 @@ if (! empty($_SESSION['encryption_key']) * 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 @@ if ($cfg['SuhosinDisableWarning'] == false * * 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 ab28b5a98a..0f2aa29639 100644 --- a/libraries/Config.php +++ b/libraries/Config.php @@ -763,7 +763,7 @@ class Config 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 31fb6e2700..b49f19320e 100644 --- a/libraries/LanguageManager.php +++ b/libraries/LanguageManager.php @@ -576,7 +576,7 @@ class LanguageManager . '/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 478dec3695..097fc88511 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 a4f6ddcc2a..3df6a22d74 100644 --- a/libraries/plugins/auth/AuthenticationCookie.php +++ b/libraries/plugins/auth/AuthenticationCookie.php @@ -101,7 +101,7 @@ class AuthenticationCookie extends AuthenticationPlugin $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 @@ class AuthenticationCookie extends AuthenticationPlugin 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 170d7c1e0e..8123bdc49f 100644 --- a/libraries/plugins/auth/AuthenticationHttp.php +++ b/libraries/plugins/auth/AuthenticationHttp.php @@ -101,7 +101,7 @@ class AuthenticationHttp extends AuthenticationPlugin ); $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 493ab3278c..78d90099d6 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 Swekey_Auth_error() // 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 b0e59c72e9..ccf8c9c69e 100644 --- a/libraries/plugins/export/ExportPdf.php +++ b/libraries/plugins/export/ExportPdf.php @@ -19,7 +19,7 @@ use PMA\libraries\properties\options\items\TextPropertyItem; /** * 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 62a47227f9..809da77532 100644 --- a/libraries/plugins/schema/pdf/PdfRelationSchema.php +++ b/libraries/plugins/schema/pdf/PdfRelationSchema.php @@ -14,7 +14,7 @@ use PMA\libraries\PDF as PDF_lib; /** * Skip the plugin if TCPDF is not available. */ -if (! file_exists(TCPDF_INC)) { +if (! @file_exists(TCPDF_INC)) { $GLOBALS['skip_import'] = true; return; }