backdrop-contrib / project

Projects associate a code-based project with releases and power the update server of BackdropCMS.org
2 stars 10 forks source link

project-release-serve-history.php throws PHP warnings when site_key is sent #35

Closed quicksketch closed 5 years ago

quicksketch commented 5 years ago

When switching backdropcms.org to a new server, we had the PHP display_errors = On in php.ini. This caused XML feeds such as:

https://updates.backdropcms.org/release-history/backdrop/1.x?site_key=yDhKD72PVzIT0hPccs5_2M6x-7qS-arVlpkW-hYSMUU&version=1.13.x-dev

... to throw PHP notices because the backdrop_bootstrap() process tries to use ini_set() after the XML has already been returned. We shouldn't be dependent on suppressing warnings/errors in order for the XML to return correctly.

quicksketch commented 5 years ago

Merged https://github.com/backdrop-contrib/project/pull/36 that will fix this issue. Though it means we'll always be bootstrapping, however we already bootstrap every time there is a site_key, which is required by all sites that get update information currently.