aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Template/IconsCacher.php
diff options
context:
space:
mode:
authorKarel Hink <info@karelhink.cz>2021-07-30 19:28:52 +0000
committerKarel Hink <info@karelhink.cz>2021-07-30 19:28:52 +0000
commit18cc6c11b51b94ef0e2be55a0cf11de920b87870 (patch)
tree47cd6e9e85560720b3c0184024b43962156f50a5 /lib/private/Template/IconsCacher.php
parent7170c03f0e11a2f7385d909cd0b98f90e0ce984c (diff)
downloadnextcloud-server-18cc6c11b51b94ef0e2be55a0cf11de920b87870.tar.gz
nextcloud-server-18cc6c11b51b94ef0e2be55a0cf11de920b87870.zip
Fix Lots of Error: file_exists(): open_basedir restriction in effect. in Log
Signed-off-by: Karel Hink <info@karelhink.cz>
Diffstat (limited to 'lib/private/Template/IconsCacher.php')
-rw-r--r--lib/private/Template/IconsCacher.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/private/Template/IconsCacher.php b/lib/private/Template/IconsCacher.php
index e379a8ed92d..01500aa2e9c 100644
--- a/lib/private/Template/IconsCacher.php
+++ b/lib/private/Template/IconsCacher.php
@@ -170,7 +170,10 @@ class IconsCacher {
} elseif (\strpos($url, $base) === 0) {
if (\preg_match('/([A-z0-9\_\-]+)\/([a-zA-Z0-9-_\~\/\.\=\:\;\+\,]+)\?color=([0-9a-fA-F]{3,6})/', $cleanUrl, $matches)) {
[,$app,$cleanUrl, $color] = $matches;
- $location = \OC_App::getAppPath($app) . '/img/' . $cleanUrl . '.svg';
+ $appPath = \OC_App::getAppPath($app);
+ if ($appPath !== false) {
+ $location = $appPath . '/img/' . $cleanUrl . '.svg';
+ }
if ($app === 'settings') {
$location = \OC::$SERVERROOT . '/settings/img/' . $cleanUrl . '.svg';
}