{"id":3977170,"date":"2013-07-31T09:39:57","date_gmt":"2013-07-31T09:39:57","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/php-version-check\/"},"modified":"2016-08-21T03:27:31","modified_gmt":"2016-08-21T03:27:31","slug":"php-version-check","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/php-version-check\/","title":{"rendered":"PHP Version check"},"content":{"rendered":"<p>I ran into a problem when I was using your plugin with PHP 5.2.*.<br \/>\nYou use the function strstr() in line 107 with 3 parameters, which is not supported before PHP Version 5.3.0.<\/p>\n<p>In line 107 you should use instead:<br \/>\n\t$url = $uri;<br \/>\n\tif($qry) {<br \/>\n\t\tif (version_compare(PHP_VERSION, &#8216;5.3.0&#8217;) &gt;= 0)<br \/>\n\t\t\t$url=strstr($uri,&#8217;?&#8217;,true);<br \/>\n\t\telse<br \/>\n\t\t\t$url=substr($uri,0,$qry);<br \/>\n\t}<\/p>\n<p>(Or just always substr())<\/p>\n<p>https:\/\/wordpress.org\/plugins\/redirect-list\/<\/p>\n","protected":false},"template":"","class_list":["post-3977170","topic","type-topic","status-closed","hentry","topic-tag-redirect","topic-tag-strstr"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/3977170","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/3977170\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=3977170"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}