mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #2277 from joernroeder/3.1
fixed undefined offset #2276
This commit is contained in:
commit
9bd9b60576
@ -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