d8-contrib-modules / cloudflare

Cloudflare Module for Drupal
16 stars 14 forks source link

Fatal: getZoneId() on null #49

Closed steveworley closed 8 years ago

steveworley commented 8 years ago

It is possible to authenticate with the CloudFlare API without having defined a website at CloudFlare. The first part of the configuration form accept the users credentials but the zone configuration form displays a fatal error:

Fatal error: Call to a member function getZoneId() on null in src/Form/ZoneSelectionForm.php on line 130

This adds some defensive coding practises around the getZoneId method call to ensure that there are zones available before attempting the zone id lookup.