Make sure plugin is a file before loading. Props filosofo. fixes #5822

git-svn-id: http://svn.automattic.com/wordpress/trunk@6897 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-02-18 17:42:51 +00:00
parent 4d82268ee7
commit 9a74743b4c
1 changed files with 1 additions and 1 deletions

View File

@ -53,7 +53,7 @@ if (isset($plugin_page)) {
wp_die(__('Invalid plugin page'));
}
if (! file_exists(ABSPATH . PLUGINDIR . "/$plugin_page"))
if (! ( file_exists(ABSPATH . PLUGINDIR . "/$plugin_page") && is_file( ABSPATH . PLUGINDIR . "/$plugin_page") ) )
wp_die(sprintf(__('Cannot load %s.'), htmlentities($plugin_page)));
do_action('load-' . $plugin_page);