Open daverobertson opened 2 years ago
Hey @daverobertson. Thanks for the report. I don't see any problems with returning the array as you suggest. So I can see this in action, though, can you let me know a theme I can use to reproduce it on my end?
It's a custom theme for a client so I cannot share, however it's based upon an earlier iteration of Sage 10. I haven't checked the most recent release, however error reporting in local development tends to be very "on" with this stack. Thanks!
Hi,
Since upgrading to 3.2.1 we've observed a "blank" classic editor in some themes example. It happens for users in roles without the "manage options" capability while editing a post type that does not use gutenberg (e.g. WooCommerce products).
It looks like the culprit is several calls to
$this->get()['active']
in class-notifications.php, but whenget()
returns an empty array (ie, when thehas_access()
is false), an error will result because there is no value for 'active'. The fix is editing the beginning of theget()
method, such as:..so the array is initialized with a value for 'active' the other checks are looking for.
Happy to submit a PR!