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,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;
} }