diff options
author | Adam Williamson <awilliam@redhat.com> | 2015-03-16 19:06:06 -0700 |
---|---|---|
committer | Adam Williamson <awilliam@redhat.com> | 2015-03-16 19:08:11 -0700 |
commit | fa1be7d29663166194b1059e24d0e319abdb47cd (patch) | |
tree | 1184eb34dbcb8c7acf03cc669deeac92976fc220 | |
parent | fc0aa0b6ae8897aea7666a36de2350106eb9999c (diff) | |
download | nextcloud-server-fa1be7d29663166194b1059e24d0e319abdb47cd.tar.gz nextcloud-server-fa1be7d29663166194b1059e24d0e319abdb47cd.zip |
fall back to absolute path for pipelined assets (#14940)
If the asset is, for example, in an apps directory that is
outside the $SERVERROOT, we won't be able to get a relative
path. We shouldn't just fail hard in this case. Fall back to
using the absolute path instead (as we used to).
-rw-r--r-- | lib/private/templatelayout.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/templatelayout.php b/lib/private/templatelayout.php index 3220d9d969c..3f8422b9f0b 100644 --- a/lib/private/templatelayout.php +++ b/lib/private/templatelayout.php @@ -242,7 +242,11 @@ class OC_TemplateLayout extends OC_Template { private static function hashFileNames($files) { foreach($files as $i => $file) { - $files[$i] = self::convertToRelativePath($file[0]).'/'.$file[2]; + try { + $files[$i] = self::convertToRelativePath($file[0]).'/'.$file[2]; + } catch (\Exception $e) { + $files[$i] = $file[0].'/'.$file[2]; + } } sort($files); |