Fixing ‘Can’t use function return value in write context’ in PHP |
X

Congrats, You are Subscribed to Receive Updates.

Fixing ‘Can’t use function return value in write context’ in PHP


Fixing ‘Can’t use function return value in write context’ in PHP.  The error comes when your php is lower than 5.5. Yes, if you upgrade your php version the problem may be solved.   if  you dont want to upgrade your php,  than check the error line,  you have write something similar to the following one.

empty(trim($variable))

Instead of this function,  just write like the following one.

  trim($variable) == false

The same problem i faced, and tried this way, it helped me to solve the issue.  if you dont see such a things, than it might be the bracket error.  instead of ‘[‘ you may used  ‘(‘.  So check it carefully,  than the issue may be solved.   Generally the error occurs with the “empty(),  trim(),   or the isset()  ” .   So check it very closely.

 

 

commenter

About Varadharaj V

The founder of Kvcodes, Varadharaj V is an ERP Analyst and a Web developer specializing in WordPress(WP), WP Theme development, WP Plugin development, Frontaccounting(FA), Sales, Purchases, Inventory, Ledgers, Payroll & HRM, CRM, FA Core Customization, PHP and Data Analyst. Database Management Advance Level

Comment Below

Your email address will not be published. Required fields are marked *

*

Current ye@r *

Menu

Sidebar