Просмотр исходного кода

[GENERIC] Zend_Validate:

- prevent warning with an configuration problem by openbase_dir

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@18841 44c647ce-9c0f-0410-b52a-842ac1e357ba
thomas 16 лет назад
Родитель
Сommit
7062c81b0e
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      library/Zend/Validate/File/MimeType.php

+ 2 - 1
library/Zend/Validate/File/MimeType.php

@@ -141,7 +141,8 @@ class Zend_Validate_File_MimeType extends Zend_Validate_Abstract
     {
         if (null === $this->_magicfile && empty($_ENV['MAGIC'])) {
             foreach ($this->_magicFiles as $file) {
-                if (file_exists($file)) {
+                // supressing errors which are thrown due to openbase_dir restrictions
+                if (@file_exists($file)) {
                     $this->setMagicFile($file);
                     break;
                 }