diff --git a/libraries/Config.php b/libraries/Config.php index 71b69b5f8e..3718a94218 100644 --- a/libraries/Config.php +++ b/libraries/Config.php @@ -453,7 +453,7 @@ class Config } elseif (function_exists('gzuncompress')) { $git_file_name = $git_folder . '/objects/' . substr($hash, 0, 2) . '/' . substr($hash, 2); - if (file_exists($git_file_name) ) { + if (@file_exists($git_file_name) ) { if (! $commit = @file_get_contents($git_file_name)) { return; } @@ -464,7 +464,7 @@ class Config $pack_names = array(); // work with packed data $packs_file = $git_folder . '/objects/info/packs'; - if (file_exists($packs_file) + if (@file_exists($packs_file) && $packs = @file_get_contents($packs_file) ) { // File exists. Read it, parse the file to get the names of the @@ -1714,7 +1714,7 @@ class Config private static function _renderCustom($filename, $id) { $retval = ''; - if (file_exists($filename)) { + if (@file_exists($filename)) { $retval .= '
'; ob_start(); include $filename; diff --git a/libraries/DisplayResults.php b/libraries/DisplayResults.php index b5437af6eb..8afe821209 100644 --- a/libraries/DisplayResults.php +++ b/libraries/DisplayResults.php @@ -3057,7 +3057,7 @@ class DisplayResults $file = $mime_map[$orgFullColName]['transformation']; $include_file = 'libraries/plugins/transformations/' . $file; - if (file_exists($include_file)) { + if (@file_exists($include_file)) { include_once $include_file; $class_name = PMA_getTransformationClassName($include_file); diff --git a/libraries/Footer.php b/libraries/Footer.php index a0cc039837..6bd0027ffb 100644 --- a/libraries/Footer.php +++ b/libraries/Footer.php @@ -67,7 +67,7 @@ class Footer private function _getDemoMessage() { $message = '' . __('phpMyAdmin Demo Server') . ': '; - if (file_exists('./revision-info.php')) { + if (@file_exists('./revision-info.php')) { include './revision-info.php'; $message .= sprintf( __('Currently running Git revision %1$s from the %2$s branch.'), diff --git a/libraries/Template.php b/libraries/Template.php index 548ec9e1a1..b7d5ac0a0c 100644 --- a/libraries/Template.php +++ b/libraries/Template.php @@ -148,7 +148,7 @@ class Template ); extract($this->data); ob_start(); - if (file_exists($template)) { + if (@file_exists($template)) { include $template; } else { throw new \LogicException( diff --git a/libraries/Theme.php b/libraries/Theme.php index 0896473dcc..38a9c5c934 100644 --- a/libraries/Theme.php +++ b/libraries/Theme.php @@ -88,7 +88,7 @@ class Theme */ function loadInfo() { - if (! file_exists($this->getPath() . '/info.inc.php')) { + if (! @file_exists($this->getPath() . '/info.inc.php')) { return false; } diff --git a/libraries/ThemeManager.php b/libraries/ThemeManager.php index 8c07e9e3bb..a615f0b10c 100644 --- a/libraries/ThemeManager.php +++ b/libraries/ThemeManager.php @@ -411,7 +411,7 @@ class ThemeManager /** * load layout file if exists */ - if (file_exists($this->theme->getLayoutFile())) { + if (@file_exists($this->theme->getLayoutFile())) { include $this->theme->getLayoutFile(); } } diff --git a/libraries/common.inc.php b/libraries/common.inc.php index b7d3f33153..40aba22b72 100644 --- a/libraries/common.inc.php +++ b/libraries/common.inc.php @@ -633,7 +633,7 @@ if (! defined('PMA_MINIMUM_COMMON')) { * the required auth type plugin */ $auth_class = "Authentication" . ucfirst($cfg['Server']['auth_type']); - if (! file_exists( + if (! @file_exists( './libraries/plugins/auth/' . $auth_class . '.php' )) { diff --git a/libraries/export.lib.php b/libraries/export.lib.php index 5f8643ef33..ad8f918284 100644 --- a/libraries/export.lib.php +++ b/libraries/export.lib.php @@ -327,7 +327,7 @@ function PMA_openExportFile($filename, $quick_export) $save_filename = PMA\libraries\Util::userDir($GLOBALS['cfg']['SaveDir']) . preg_replace('@[/\\\\]@', '_', $filename); - if (file_exists($save_filename) + if (@file_exists($save_filename) && ((! $quick_export && empty($_REQUEST['onserver_overwrite'])) || ($quick_export && $_REQUEST['quick_export_onserver_overwrite'] != 'saveitover')) diff --git a/libraries/plugins/auth/AuthenticationSignon.php b/libraries/plugins/auth/AuthenticationSignon.php index 644adfcb18..9b7f4d3118 100644 --- a/libraries/plugins/auth/AuthenticationSignon.php +++ b/libraries/plugins/auth/AuthenticationSignon.php @@ -82,7 +82,7 @@ class AuthenticationSignon extends AuthenticationPlugin /* Handle script based auth */ if (!empty($script_name)) { - if (!file_exists($script_name)) { + if (!@file_exists($script_name)) { PMA_fatalError( __('Can not find signon authentication script:') . ' ' . $script_name diff --git a/libraries/plugins/import/ImportShp.php b/libraries/plugins/import/ImportShp.php index 02fdd73574..55e9e008b7 100644 --- a/libraries/plugins/import/ImportShp.php +++ b/libraries/plugins/import/ImportShp.php @@ -140,7 +140,7 @@ class ImportShp extends ImportPlugin // Delete the .dbf file extracted to 'TempDir' if ($temp_dbf_file && isset($dbf_file_path) - && file_exists($dbf_file_path) + && @file_exists($dbf_file_path) ) { unlink($dbf_file_path); } diff --git a/prefs_manage.php b/prefs_manage.php index faed8f9c3b..5341201bbd 100644 --- a/prefs_manage.php +++ b/prefs_manage.php @@ -285,7 +285,7 @@ echo '
' , __('Go') . '" />' , '' , ''; -if (file_exists('setup/index.php') && ! file_exists(CONFIG_FILE)) { +if (@file_exists('setup/index.php') && ! @file_exists(CONFIG_FILE)) { // show only if setup script is available, allows to disable this message // by simply removing setup directory // Also do not show in config exists (and setup would refuse to work) diff --git a/setup/index.php b/setup/index.php index 594716dcfe..cff91b448d 100644 --- a/setup/index.php +++ b/setup/index.php @@ -12,7 +12,7 @@ */ require './lib/common.inc.php'; -if (file_exists(CONFIG_FILE) && ! $cfg['DBG']['demo']) { +if (@file_exists(CONFIG_FILE) && ! $cfg['DBG']['demo']) { PMA_fatalError(__('Configuration already exists, setup is disabled!')); } @@ -21,7 +21,7 @@ $page = preg_replace('/[^a-z]/', '', $page); if ($page === '') { $page = 'index'; } -if (!file_exists("./setup/frames/$page.inc.php")) { +if (!@file_exists("./setup/frames/$page.inc.php")) { // it will happen only when entering URL by hand, we don't care for these cases PMA_fatalError(__('Wrong GET file attribute value')); }