PHP error on old site

My (very old v. 0.95) Kirby site is not working after updating to a new PHP version. Would anyone here be able to help me to fix this? I am not sure what to do…

Fatal error: $GLOBALS can only be modified using the $GLOBALS[$name] = $value syntax in /var/www/tonehoved.dk/public_html/synsnerve.dk/kirby/lib/kirby.php on line **2046
**
/**
* Sets a global by key
*
* @param string $key The key to define
* @param mixed $value The value for the passed key
*/
static function set($key, $value=null) {
if(is_array($key)) {
// set all new values
$GLOBALS = array_merge($GLOBALS, $key);
} else {
$GLOBALS[$key] = $value;
}
}

What PHP version did you update to and why? You cannot simply fix this if you updated to a current PHP version, because that old Kirby version does not support any newer PHP versions. Once you fix this issue, you will run into the next.

IMO, you have exactly two options (maybe 3 options)

  1. Downgrade PHP to a version compatible with that old Kirby version
  2. Update the site to a new Kirby version
  3. Convert to a static site

Thank you! I will try to downgrade PHP and see what happens!