php 5.3 - PHP Fatal error: Can't use method return value in write context -
this question has answer here:
- reference - error mean in php? 29 answers
if (isset( $xml->xpath('/lfm/artist/image[@size="extralarge"]')[0])) { php version 5.3 in use (was 5.7 until server dude switched 5.3).
on line @ top we're getting error:
php fatal error: can't use method return value in write context i've read few articles nothing obvious springs mind - might case of not seeing wood through trees.
any advice on how rid of error other switching 5.7?
for compatibility php < 5.4, update code follows:
$elements = $xml->xpath('/lfm/artist/image[@size="extralarge"]'); if (isset($elements[0])) { take @ https://wiki.php.net/rfc/functionarraydereferencing if you're interested in learning more.
Comments
Post a Comment