Merge pull request #8033 from gorriecoe/4

[Fix] Added isset check for registered controller links in dev admin
This commit is contained in:
Damian Mooyman 2018-04-26 12:21:46 +12:00 committed by GitHub
commit 9cb769327f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -148,12 +148,14 @@ 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) {
foreach ($registeredController['links'] as $url => $desc) { if (isset($registeredController['links'])) {
$links[$url] = $desc; foreach ($registeredController['links'] as $url => $desc) {
$links[$url] = $desc;
}
} }
} }
return $links; return $links;