Added isset check for registered controller links in dev admin

This commit is contained in:
Gorrie Coe 2018-04-24 22:34:37 +12:00
parent 8f3c0d3b73
commit 59f598d639

View File

@ -148,14 +148,16 @@ class DevelopmentAdmin extends Controller
*/ */
protected static function get_links() protected static function get_links()
{ {
$links = array(); $links = [];
$reg = Config::inst()->get(__CLASS__, 'registered_controllers'); $reg = Config::inst()->get(__CLASS__, 'registered_controllers');
foreach ($reg as $registeredController) { foreach ($reg as $registeredController) {
if (isset($registeredController['links'])) {
foreach ($registeredController['links'] as $url => $desc) { foreach ($registeredController['links'] as $url => $desc) {
$links[$url] = $desc; $links[$url] = $desc;
} }
} }
}
return $links; return $links;
} }