From 96a3be53cdd306269aec425d53d43240ea7d62ab Mon Sep 17 00:00:00 2001 From: Joe Digilio Date: Wed, 13 Jun 2018 12:35:33 -0500 Subject: [PATCH] PHP 5.4 does not support parse_ini_file()'s INI_SCANNER_TYPED. Use INI_SCANNER_RAW instead, and if the value is supposed to be boolen, then convert the string. --- RSS-Bridge-on-PHP-5.4.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/RSS-Bridge-on-PHP-5.4.md b/RSS-Bridge-on-PHP-5.4.md index ebd33d3..1710aca 100644 --- a/RSS-Bridge-on-PHP-5.4.md +++ b/RSS-Bridge-on-PHP-5.4.md @@ -1,6 +1,6 @@ -RSS-Bridge does no longer support PHP 5.4 (see [Requirements](Requirements)), but can be made compatible to run on PHP 5.4 installations. The following script provides an automated way to downgrade the sources. +RSS-Bridge no longer supports PHP 5.4 (see [Requirements](Requirements)), but can be made compatible to run on PHP 5.4 installations. The following script provides an automated way to downgrade the sources. -Be aware that this script may stop working on any release without notice. This script may or may not be updated in the future. It is known to work on commit [2fd60c68b083f43068703cab87c5e72a8eacc1c4](https://github.com/RSS-Bridge/rss-bridge/commit/2fd60c68b083f43068703cab87c5e72a8eacc1c4). +Be aware that this script may stop working on any release without notice. This script may or may not be updated in the future. It is known to work on commit [4c5013bc82ea9385beb8c6354d367401a15bdf97](https://github.com/RSS-Bridge/rss-bridge/commit/4c5013bc82ea9385beb8c6354d367401a15bdf97) (release version 2018-06-10). Place the following content in a file called **downgrade.sh** in the **root folder of your RSS-Bridge installation**: @@ -10,7 +10,7 @@ Place the following content in a file called **downgrade.sh** in the **root fold echo "Downgrade RSS-Bridge to PHP 5.4.0" # index.php -sed -i 's/5.6.0/5.4.0/g' ./index.php +sed -i 's/5.6.0/5.4.0/g; s/INI_SCANNER_TYPED/INI_SCANNER_RAW/g; s/if(!is_bool(\($config.*\)))/\1 = (\1 === "true");\n&/' # html.php sed -i 's/$bridgeClass::PARAMETERS/$bridgeClass::$PARAMETERS/g' ./lib/html.php