f3-factory / fatfree-core

Fat-Free Framework core library
GNU General Public License v3.0
207 stars 88 forks source link

Fix URL parse with PHP < 5.4.7 #247

Closed korukugashi closed 6 years ago

korukugashi commented 6 years ago

Bug : routes are "404 not found //example.com/"

We must provide the protocole in the URL scheme to be compatible with versions of PHP < 5.4.7 and > 5.4

See : http://php.net/manual/en/function.parse-url.php PHP 5.4.7 - Fixed host recognition when scheme is omitted and a leading component separator is present

xfra35 commented 6 years ago

Nice spot @korukugashi thanks.

@ikkez what's the PHP requirement now? composer.json says 5.4 but I thought it was a bit higher than that.

ikkez commented 6 years ago

I'm not sure... I'm testing here with the latest version 5.4.45, which had its end of life almost 2,5 years ago. Version 5.4.7 is from Sep 2012... I'd suggest you update the server @korukugashi

korukugashi commented 6 years ago

I agree that's an outdated version. I cannot update the server for specific constraints.

If you do not take into account this compatibility, which I understand perfectly, you should increase the version number supported by the framework to 5.4.7 and not 5.4.