I am developing a custom module in prestashop. In that I have taken value inside a function like this
$fname = !empty(Tools::getValue('fname')) ? Tools::getValue('fname') : '';
but its showing error like this
Fatal error: Can't use function return value in write context
So can someone tell me why the error is here? How to solve this issue?
I got the answer. It should be like this
Tools::getValue('fname') ? Tools::getValue('fname') : ' ';