Open majick777 opened 4 years ago
Hi, thanks for ur feedback ! First error is weird. Maybe because you can't calculate a value within an array with older versions ? I fixed the second one for a further release.
but php 5.3.2 is then years old, maybe it's time to move on :) Not everything can be kept backward compatible.
For new plugins I totally agree, keeping backwards compatibility is not really worth the time. However, as I have recently taken over one which is a lot older, where the users may still be on old PHP versions too (since some are very slow to update the plugin also.) It makes sense for me to not use code that could break a site on update, and so I've been testing on an old PHP version to check... well that is my reasoning anyway, and I just happened to install yours on that local test install too as it was at hand.
Went to check out this plugin and just happened to try to activate this on an old local install I had open - with an older version of PHP (5.3.2) and got a fatal error on activation...
Unexpected * on line 17 of /classes/wpsstm-post-tracklist-class.php
... when I changed the value:15 * TIME_IN_SECONDS
to just900
it worked just fine. Well that's a truly weird one! I'm really not sure what the problem there is (some weird bug in the handling of variable definitions in old PHP version? I would think it would still handle a simple array value fine but there ya go.)Then got an unexpected [ on line 878 of the same file and just changed:
[$$tracks_arr]
toarray($tracks_arr)
Not that one should be encouraging use of old PHP versions, but if it's some minor changes like this this it could be made backwards compatible..? It activated after just those two changes so it seems like it might be just in that one file (but of course
[]
might be used elsewhere.)in any case there could be a PHP minimum tag added in the readme.txt, so thought it was worth mentioning all this so you are aware of it.