Strict Standards: Only variables should be assigned by reference PHP 5.4
This error message is indicating that a value is being assigned to a variable by reference, which is not allowed in PHP version 5.4 or later
This error message indicates that a value is being assigned to a variable by reference, which is deprecated in PHP 5.4 and later. In earlier PHP versions, you could directly assign a reference to a return value or literal, but this behavior was removed to prevent unexpected side effects and simplify memory management.
To fix this error, remove the & symbol from any assignment where a value is being assigned by reference.
Example of the error:
// PHP 5.4+ throws: Strict Standards: Only variables should be assigned by reference
$result = &getValue();Corrected approach:
// Assign by value first
$result = getValue();
// Or, if a reference is truly needed:
$temp = getValue();
$result = &$temp;