Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP Notice and White Screen When User without Dashboard Access Logs In #63

Open
mrwweb opened this issue Oct 21, 2020 · 0 comments
Open

Comments

@mrwweb
Copy link
Contributor

mrwweb commented Oct 21, 2020

See: https://wordpress.org/support/topic/bug-when-user-does-not-have-permission-to-access-page/

When a logged-in user does not have permission to view the admin dashboard and visits /wp-admin/ the following errors occur:

[30-Mar-2020 11:36:28 UTC] PHP Notice: Trying to get property ‘cap’ of non-object in /var/www/wordpress/wp-content/plugins/wp-help/classes/plugin.php on line 211
[30-Mar-2020 11:36:28 UTC] PHP Stack trace:
[30-Mar-2020 11:36:28 UTC] PHP 1. {main}() /var/www/wordpress/wp-admin/index.php:0
[30-Mar-2020 11:36:28 UTC] PHP 2. require_once() /var/www/wordpress/wp-admin/index.php:10
[30-Mar-2020 11:36:28 UTC] PHP 3. require() /var/www/wordpress/wp-admin/admin.php:153
[30-Mar-2020 11:36:28 UTC] PHP 4. require_once() /var/www/wordpress/wp-admin/menu.php:326
[30-Mar-2020 11:36:28 UTC] PHP 5. do_action() /var/www/wordpress/wp-admin/includes/menu.php:155
[30-Mar-2020 11:36:28 UTC] PHP 6. WP_Hook->do_action() /var/www/wordpress/wp-includes/plugin.php:478
[30-Mar-2020 11:36:28 UTC] PHP 7. WP_Hook->apply_filters() /var/www/wordpress/wp-includes/class-wp-hook.php:312
[30-Mar-2020 11:36:28 UTC] PHP 8. CWS_WP_Help_Plugin->admin_menu() /var/www/wordpress/wp-includes/class-wp-hook.php:288
[30-Mar-2020 11:36:28 UTC] PHP 9. CWS_WP_Help_Plugin->get_cap() /var/www/wordpress/wp-content/plugins/wp-help/classes/plugin.php:601
[30-Mar-2020 11:36:28 UTC] PHP Notice: Trying to get property ‘read_posts’ of non-object in /var/www/wordpress/wp-content/plugins/wp-help/classes/plugin.php on line 211
[30-Mar-2020 11:36:28 UTC] PHP Stack trace:
[30-Mar-2020 11:36:28 UTC] PHP 1. {main}() /var/www/wordpress/wp-admin/index.php:0
[30-Mar-2020 11:36:28 UTC] PHP 2. require_once() /var/www/wordpress/wp-admin/index.php:10
[30-Mar-2020 11:36:28 UTC] PHP 3. require() /var/www/wordpress/wp-admin/admin.php:153
[30-Mar-2020 11:36:28 UTC] PHP 4. require_once() /var/www/wordpress/wp-admin/menu.php:326
[30-Mar-2020 11:36:28 UTC] PHP 5. do_action() /var/www/wordpress/wp-admin/includes/menu.php:155
[30-Mar-2020 11:36:28 UTC] PHP 6. WP_Hook->do_action() /var/www/wordpress/wp-includes/plugin.php:478
[30-Mar-2020 11:36:28 UTC] PHP 7. WP_Hook->apply_filters() /var/www/wordpress/wp-includes/class-wp-hook.php:312
[30-Mar-2020 11:36:28 UTC] PHP 8. CWS_WP_Help_Plugin->admin_menu() /var/www/wordpress/wp-includes/class-wp-hook.php:288
[30-Mar-2020 11:36:28 UTC] PHP 9. CWS_WP_Help_Plugin->get_cap() /var/www/wordpress/wp-content/plugins/wp-help/classes/plugin.php:601

I am more than happy to fix this if you would like. Would it be possible to port the source code to github though, and I can submit a pull request?

I can confirm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant