TheCodeCompany / wp-chargify

0 stars 1 forks source link

Warning: Invalid argument supplied for foreach() in /vagrant/wp/wp-includes/class-wp-list-util.php on line 168 #72

Closed BronsonQuick closed 4 years ago

BronsonQuick commented 4 years ago

As a user when I load the options page (http://chargify.local/wp/wp-admin/admin.php?page=chargify_options) AFTER activating the plugin but BEFORE setting any API credentials, I receive the following: Warning: Invalid argument supplied for foreach() in /vagrant/wp/wp-includes/class-wp-list-util.php on line 168 This warning appeared for the Chargify Products field as it was trying list products when connecting to the API gave back an empty response.

As a unit test I should test for this conditions to make sure this situation is handled and tested accordingly.