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

Warning: Parameter 2 to SyndicationDataQueries::posts_search() expected to be a reference, value given in /Applications/MAMP/htdocs/wordpress/wp-includes/class-wp-hook.php on line 298 #86

Closed
Gaelan opened this issue Mar 21, 2017 · 3 comments

Comments

@Gaelan
Copy link

Gaelan commented Mar 21, 2017

Appears as soon as I set up a feed on WP 4.7.3, PHP 7.1.0. Any idea what could be happening?

@BrookeDot
Copy link
Contributor

Hi @Gaelan I also ran into this and ended up just disabling the plugin.

But to give you a starting place if you want to patch this, PHP 7.1 changed the way refrences work. (see: http://php.net/manual/en/language.references.php) the error comes from the & in front of values in functions like here:

function posts_search ($search, &$query) {

If you changed function posts_search ($search, &$query) { to function posts_search ($search, $query) { the warning would be resolved (you'll of course need to do this for each place where a &$variable is used.

@chasegawa
Copy link

I see it as well and had to disable the plugin.

Warning: Parameter 2 to SyndicationDataQueries::posts_search() expected to be a reference, value given in /storage/h14/785/1479785/public_html/wp-includes/class-wp-hook.php on line 298

Warning: Parameter 2 to SyndicationDataQueries::posts_where() expected to be a reference, value given in /storage/h14/785/1479785/public_html/wp-includes/class-wp-hook.php on line 298

@radgeek
Copy link
Owner

radgeek commented Oct 27, 2017

This issue should be resolved by the fix contained in @david-robinson-practiceweb 's pull request, which I merged into the most recent release of FeedWordPress. Thanks for the report, let me know if the problem is resolved on your end or if there's anything else that needs attention.

@radgeek radgeek closed this as completed Oct 27, 2017
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

4 participants