From e2a43961d0fc4a721cc0e533c1da5907303933de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=CC=88rn=20Ro=CC=88der?= Date: Sun, 28 Jul 2013 19:39:40 +0200 Subject: [PATCH] fixed undefined offset #2276 --- view/SSViewer.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/view/SSViewer.php b/view/SSViewer.php index f11a335ff..9a21febfe 100644 --- a/view/SSViewer.php +++ b/view/SSViewer.php @@ -834,9 +834,13 @@ class SSViewer { } $found = $loader->findTemplates("$type/$identifier", $theme); - if ($found) { + if (isset($found['main'])) { return $found['main']; } + else if (!empty($found)) { + $founds = array_values($found); + return $founds[0]; + } } /**