quiten open_basedir warnings, when minify tries to access docroot

This commit is contained in:
Ralf Becker 2014-07-21 07:03:12 +00:00
parent 9ca2f15c2b
commit 59a327f5fb
2 changed files with 2 additions and 2 deletions

View File

@ -208,7 +208,7 @@ class Minify_CSS_UriRewriter {
*/ */
protected static function _realpath($path) protected static function _realpath($path)
{ {
$realPath = realpath($path); $realPath = @realpath($path);
if ($realPath !== false) { if ($realPath !== false) {
$path = $realPath; $path = $realPath;
} }

View File

@ -142,7 +142,7 @@ class Minify_Controller_MinApp extends Minify_Controller_Base {
} }
$base_path = $_SERVER['DOCUMENT_ROOT'].$base; $base_path = $_SERVER['DOCUMENT_ROOT'].$base;
// check base against symlinks to support aliases configured via symlinks // check base against symlinks to support aliases configured via symlinks
if (!(file_exists($base_path) && is_dir($base_path) && realpath($base_path) !== false) && if (!(file_exists($base_path) && is_dir($base_path) && @realpath($base_path) !== false) &&
isset($options['minifierOptions']['text/css']['symlinks'][$t='//'.trim($base, '/')]) && isset($options['minifierOptions']['text/css']['symlinks'][$t='//'.trim($base, '/')]) &&
($base_path = realpath($options['minifierOptions']['text/css']['symlinks'][$t]))) { ($base_path = realpath($options['minifierOptions']['text/css']['symlinks'][$t]))) {
$base_path .= '/'; $base_path .= '/';