Patch to get Magento 1.9 working with >= PHP 7.0.0 RC 6
Patch using method below or if you don’t want to patch a core file, see this Magento extension that does the same thing but correctly overrides the core file:
https://github.com/MageMechanic/PhpSeven
# run in magento root directory
# one-liner to apply patch using wget
wget -qO- 'https://gist.githubusercontent.com/MageMechanic/66449504110fbbd96214/raw/php7_magento_1_9_core.patch' | patch -p0
# one-liner to apply patch using curl
curl -s 'https://gist.githubusercontent.com/MageMechanic/66449504110fbbd96214/raw/php7_magento_1_9_core.patch' | patch -p0
# ...easier to read
PATCH_URL='https://gist.githubusercontent.com/MageMechanic/66449504110fbbd96214/raw/php7_magento_1_9_core.patch'
# to apply with wget
wget -qO- $PATCH_URL | patch -p0
# ...or with curl
curl -s $PATCH_URL | patch -p0
# to revert using wget
wget -qO- $PATCH_URL | patch -p0 -R
# ...or revert using curl
curl -s $PATCH_URL | patch -p0 -R