I am developing a new plugin "event-watcher-ajax" that is supposed to display incoming events life in a widget and on a page.
Now I try to ajax-call the page, however I get this error:
PHP Fatal error: Can't use function return value in write context in /event-watcher-ajax/qa-event-watcher-page.php on line 64
CODE of the page:
function process_request($request)
{
// we received post data, so it should be the ajax call!
if( qa_post_text('request') ) {
// process and return
// the return causes the error above!
}
else {
// default loading of page
// preparation of output and stuff...
// + jquery ajax call "$('#responsecontainer').load('".qa_self_html()."')...
}
---
Update: I am reading the post just once and it works: $transferString = qa_post_text('request');
But another problem occured: The ajax call to the plugin itself outputs all theme content (menu and stuff), even if I catch the post first and do not output $qa_content = qa_content_prepare();
Do I have to call a layer? What am I doing wrong?
Any help appreciated!