Old extern/ipn.php script fails bootstrap
I get the following error message in php logs:
PHP message: PHP Fatal error: Uncaught Error: Call to undefined function variable_get() in ...sites/all/modules/civicrm/CRM/Utils/System/Drupal.php:790
Stack trace:
#0 ...sites/all/modules/civicrm/CRM/Core/Payment/PayPalIPN.php(401): CRM_Utils_System_Drupal->getTimeZoneString()
#1 ...sites/all/modules/civicrm/CRM/Core/Payment/PayPalIPN.php(318): CRM_Core_Payment_PayPalIPN->getInput(Array, Array)
#2 ...sites/all/modules/civicrm/extern/ipn.php(59): CRM_Core_Payment_PayPalIPN->main()
#3 {main}
thrown in ...sites/all/modules/civicrm/CRM/Utils/System/Drupal.php on line 790
It looks like the ipn.php script does not bootstrap Drupal, but it calls getTimeZoneString which depends on the user system (Drupal) and the Drupal version of that includes a call to Drupal's variable_get
function which has not been defined yet.
This is a problem for anyone with old recurring PayPal donations. Potentially other payment gateways, too, although the ipn.php script does seem to heavily assume PayPal.
There's some discussion at https://chat.civicrm.org/civicrm/pl/brmbdz616jn6bymeqz6bgtu3qa about possible ways forward.