From 59a327f5fba4453dea792d479ea5acf55bc04762 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 21 Jul 2014 07:03:12 +0000 Subject: [PATCH] quiten open_basedir warnings, when minify tries to access docroot --- phpgwapi/inc/min/lib/Minify/CSS/UriRewriter.php | 2 +- phpgwapi/inc/min/lib/Minify/Controller/MinApp.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpgwapi/inc/min/lib/Minify/CSS/UriRewriter.php b/phpgwapi/inc/min/lib/Minify/CSS/UriRewriter.php index e670340e36..79f7d98e69 100755 --- a/phpgwapi/inc/min/lib/Minify/CSS/UriRewriter.php +++ b/phpgwapi/inc/min/lib/Minify/CSS/UriRewriter.php @@ -208,7 +208,7 @@ class Minify_CSS_UriRewriter { */ protected static function _realpath($path) { - $realPath = realpath($path); + $realPath = @realpath($path); if ($realPath !== false) { $path = $realPath; } diff --git a/phpgwapi/inc/min/lib/Minify/Controller/MinApp.php b/phpgwapi/inc/min/lib/Minify/Controller/MinApp.php index 7988526f26..54febee474 100755 --- a/phpgwapi/inc/min/lib/Minify/Controller/MinApp.php +++ b/phpgwapi/inc/min/lib/Minify/Controller/MinApp.php @@ -142,7 +142,7 @@ class Minify_Controller_MinApp extends Minify_Controller_Base { } $base_path = $_SERVER['DOCUMENT_ROOT'].$base; // 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, '/')]) && ($base_path = realpath($options['minifierOptions']['text/css']['symlinks'][$t]))) { $base_path .= '/';