mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-06-30 16:39:38 +02:00
fixed undefined offset #2276
This commit is contained in:
parent
541436feb0
commit
e2a43961d0
|
@ -834,9 +834,13 @@ class SSViewer {
|
||||||
}
|
}
|
||||||
$found = $loader->findTemplates("$type/$identifier", $theme);
|
$found = $loader->findTemplates("$type/$identifier", $theme);
|
||||||
|
|
||||||
if ($found) {
|
if (isset($found['main'])) {
|
||||||
return $found['main'];
|
return $found['main'];
|
||||||
}
|
}
|
||||||
|
else if (!empty($found)) {
|
||||||
|
$founds = array_values($found);
|
||||||
|
return $founds[0];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue
Block a user