From fa1be7d29663166194b1059e24d0e319abdb47cd Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Mon, 16 Mar 2015 19:06:06 -0700 Subject: [PATCH] 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). --- lib/private/templatelayout.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/private/templatelayout.php b/lib/private/templatelayout.php index 3220d9d969..3f8422b9f0 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);