summaryrefslogtreecommitdiffstats
path: root/lib/private/Template/IconsCacher.php
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2021-10-01 14:45:40 +0200
committerGitHub <noreply@github.com>2021-10-01 14:45:40 +0200
commitfb2fd3457650464230e052a91f573ba052950fef (patch)
treef095b5aa6e0a940c9ad17bd66dbc483777698775 /lib/private/Template/IconsCacher.php
parent4737708807203c091825bc3f65f7004abe505104 (diff)
parent18cc6c11b51b94ef0e2be55a0cf11de920b87870 (diff)
downloadnextcloud-server-fb2fd3457650464230e052a91f573ba052950fef.tar.gz
nextcloud-server-fb2fd3457650464230e052a91f573ba052950fef.zip
Merge pull request #28263 from Hinyka/bugfix/27759
Fix Lots of Error: file_exists(): open_basedir restriction in effect.…
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';
}