Resolved issue: PHP Fatal error: Cant use function return value in write context