1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-04 15:47:32 +02:00

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.

Joe Digilio
2018-06-13 12:35:33 -05:00
parent 89feaa990b
commit 96a3be53cd

@@ -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