Error calling get_post (on PHP 4 I think)…
-
Hi guys,
I’m having a problem with a plugin I’ve written and I believe I’ve tracked down the issue but I’m unsure as to how to fix it.
I’m using get_post() to retrieve post data for a set of chosen posts and I’m getting the following error from about 20% of the people using the plugin:
Fatal error: Only variables can be passed by reference
I beleive these users may still be on PHP 4 which is causing the error when calling the function with a dummy variable:
$post_list = array(1,2,3,4,5); foreach ($post_list as $post_to_get){ $post_data = get_post($dummyid = $post_to_get); }
Any thoughts on how to solve this?
Thanks in advance,
Dave.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Error calling get_post (on PHP 4 I think)…’ is closed to new replies.