Hi guys!
I have this line which works perfectly fine on my laptop, and at work running php 5.3.4 and 5.3.8 respectively:
$userTopScore = isset($_SESSION['userid']) ? $this->Model->getUserTopScores($_SESSION['userid']) ?:NULL : NULL;
However on my hosted server (publicly viewable domain) which is running 5.2.17 I get the following error:
Parse error: syntax error, unexpected ':' in /path/to/controllers/JumbleWords.php on line 40
However I can't seem to find any mention of it in the changelog other than:
Fixed bug #49269 (Ternary operator fails on Iterator object when used inside foreach declaration). (Etienne, Dmitry)
However this line is in both the version changes for 5.2.11 and 5.3.1 tho the Iterator object doesn't seem to be involved. Any ideas why I can't use ternary this way on the older version? Is there a setting somewhere that I have on my two controlled machines but not on the server?