Hi. Error comes with this line:
$docx->embedHTML("<img src='http://www.somkiat.cc/wp-content/uploads/2016/07/ErrorMessage.jpg' />");
No problem with:
$docx->embedHTML("<p>dsadsa</p>);
-------------------------
Strange thing is. When I run on localhost I dont see any problem but when I run it on real server then I got his error: Only variables should be passed by reference.