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