diff options
author | cash <cash.costello@gmail.com> | 2013-05-02 19:56:52 -0400 |
---|---|---|
committer | cash <cash.costello@gmail.com> | 2013-05-02 19:56:52 -0400 |
commit | 459e8d04b88b8bf7914105b1723624d23a5b3669 (patch) | |
tree | 36566abbb8a5d19dabea795b26b8865558325a19 /engine | |
parent | a1f59d380a15c3bdf002e5fec2db039a8be9e28b (diff) | |
download | elgg-459e8d04b88b8bf7914105b1723624d23a5b3669.tar.gz elgg-459e8d04b88b8bf7914105b1723624d23a5b3669.tar.bz2 |
Fixes #5405 fixes fatal error
Diffstat (limited to 'engine')
-rw-r--r-- | engine/lib/admin.php | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/engine/lib/admin.php b/engine/lib/admin.php index ec19a5476..243cdef46 100644 --- a/engine/lib/admin.php +++ b/engine/lib/admin.php @@ -468,14 +468,18 @@ function admin_page_handler($page) { $vars = array('page' => $page); // special page for plugin settings since we create the form for them - if ($page[0] == 'plugin_settings' && isset($page[1]) && - (elgg_view_exists("settings/{$page[1]}/edit") || elgg_view_exists("plugins/{$page[1]}/settings"))) { + if ($page[0] == 'plugin_settings') { + if (isset($page[1]) && (elgg_view_exists("settings/{$page[1]}/edit") || + elgg_view_exists("plugins/{$page[1]}/settings"))) { - $view = 'admin/plugin_settings'; - $plugin = elgg_get_plugin_from_id($page[1]); - $vars['plugin'] = $plugin; + $view = 'admin/plugin_settings'; + $plugin = elgg_get_plugin_from_id($page[1]); + $vars['plugin'] = $plugin; - $title = elgg_echo("admin:{$page[0]}"); + $title = elgg_echo("admin:{$page[0]}"); + } else { + forward('', '404'); + } } else { $view = 'admin/' . implode('/', $page); $title = elgg_echo("admin:{$page[0]}"); |