okwinza / icecast2-php-api

A powerful and flexible REST API for IceCast2 written in PHP
52 stars 12 forks source link

Don't use PHP short open tags in publicly distributed code #2

Closed AndisGrossteins closed 8 years ago

AndisGrossteins commented 9 years ago

It didn't work for me at first and then I discovered that few files have short open PHP tags <?, not <?php as should be for portable code. Don't take just my word for it. Here is a list of nine reasons why PHP short_open_tag should not be used.

And here is a handy regex for you to find all of them: /(<\?)[^px=]/

okwinza commented 9 years ago

True. Thanks for your feedback, i'll fix it later today.

AndisGrossteins commented 9 years ago

Good, but I've hit another bug - /gracenote-php/HTTP.class.php on line 113 should be GNError::HTTP_RESPONSE_ERROR_CODE, not GNError::HTTP_RESPONSE_ERROR, as there is not constant by that name.

okwinza commented 9 years ago

It's a 3rd party lib. Ideally, it should be installed by composer as a dependency. Anyway, i'm planning to do a full refactoring of this in the near future. But the issues you mentioned(and couple others) will be fixed in this branch, so don't worry :) And thanks for your feedback once again.