getIPAddress Error when Bootstrapping Civi in CLI script
We recently started getting the following error when we try to bootstrap Civi via a command line script. I believe this just started happening, once we upgraded Firewall to v1.3. We bootstrap using "$civi_config = civi_bootstrap();" and this is the error we get:
PHP Fatal error: Uncaught TypeError: Return value of Civi\Firewall\Firewall::getIPAddress() must be of the type string, null returned in /var/www/crm/sites/default/files/civicrm/ext/firewall/Civi/Firewall/Firewall.php:263
Stack trace:
#0 /var/www/crm/sites/default/files/civicrm/ext/firewall/Civi/Firewall/Firewall.php(100): Civi\Firewall\Firewall->getIPAddress()
#1 /var/www/crm/sites/default/files/civicrm/ext/firewall/Civi/Firewall/Firewall.php(83): Civi\Firewall\Firewall->shouldThisRequestBeBlocked()
#2 /var/www/crm/sites/default/files/civicrm/ext/firewall/firewall.php(16): Civi\Firewall\Firewall->run()
#3 /var/www/crm/sites/all/modules/civicrm/CRM/Utils/Hook.php(271): firewall_civicrm_config()
#4 /var/www/crm/sites/all/modules/civicrm/CRM/Utils/Hook/DrupalBase.php(73): CRM_Utils_Hook->runHooks()
#5 /var/www/crm/sites/all/modules/civicrm/Civi/Core/CiviEventDispatcher.php(237): CRM_ in /var/www/crm/sites/default/files/civicrm/ext/firewall/Civi/Firewall/Firewall.php on line 263