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

Error re. array_key_exists #135

Closed
tbnv opened this issue Jan 11, 2019 · 4 comments
Closed

Error re. array_key_exists #135

tbnv opened this issue Jan 11, 2019 · 4 comments

Comments

@tbnv
Copy link

tbnv commented Jan 11, 2019

Hello.
This error appears in front-end since v3.2.
I reverted back to v3.1.2.

Warning
: array_key_exists() expects parameter 2 to be array, null given in
[path]/wp-content/plugins/wp-document-revisions/includes/class-wp-document-revisions.php
on line
1395
@benbalter
Copy link
Collaborator

https://github.com/benbalter/wp-document-revisions/blob/master/includes/class-wp-document-revisions.php#L1394-L1398 is the relevant line.

I'm not sure why $wp_query->query_vars would be null, but easy enough to guard against it.

What version of WordPress are you using?

@tbnv
Copy link
Author

tbnv commented Jan 11, 2019

We're using WP 5.0.3.

The error also appears on the front page of the website, even though there is no call to a document monitored by the plugin there.

@tbnv
Copy link
Author

tbnv commented Jan 14, 2019

I see you applied the fix, thanks.
Any idea the it'll be pushed to the WP repo?

@tbnv
Copy link
Author

tbnv commented Jan 17, 2019

Hi!

There is still an error about this when debug mode is enabled:

 Notice: Trying to get property 'query_vars' of non-object in [path]/wp-content/plugins/wp-document-revisions/includes/class-wp-document-revisions.php on line 1395

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

2 participants