• Resolved julijadaisoras

    (@julijadaisoras)


    Hello,

    I have a problem with this plugin, when I try to open or create new form.

    I get this error:

    PHP Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, bool given in /var/www/wordpress/wp-content/plugins/official-mailerlite-sign-up-forms/src/Api/MailerLiteAPI.php:86
    Stack trace: 0 /var/www/wordpress/wp-content/plugins/official-mailerlite-sign-up-forms/src/Api/MailerLiteAPI.php(86): count() 1 /var/www/wordpress/wp-content/plugins/official-mailerlite-sign-up-forms/src/Api/PlatformAPI.php(90): MailerLiteForms\Api\MailerLiteAPI->checkMoreGroups() 2 /var/www/wordpress/wp-content/plugins/official-mailerlite-sign-up-forms/src/Modules/Form.php(297): MailerLiteForms\Api\PlatformAPI->checkMoreGroups() 3 /var/www/wordpress/wp-content/plugins/official-mailerlite-sign-up-forms/src/Controllers/AdminController.php(57): MailerLiteForms\Modules\Form::create_new_form() 4 /var/www/wordpress/wp-includes/class-wp-hook.php(324): MailerLiteForms\Controllers\AdminController::forms() 5 /var/www/wordpress/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() 6 /var/www/wordpress/wp-includes/plugin.php(517): WP_Hook->do_action() 7 /var/www/wordpress/wp-admin/admin.php(259): do_action() 8 {main}

    thrown in /var/www/wordpress/wp-content/plugins/official-mailerlite-sign-up-forms/src/Api/MailerLiteAPI.php on line 86

Viewing 2 replies - 1 through 2 (of 2 total)
  • I fixed it by changing line 86 to
    return count( is_array(self::parseResponse($response)) ? self::parseResponse($response) : [] ) > 0;

    Plugin Author MailerLite

    (@mailerlite)

    Hello there,

    Thank you for the provided details. We will make the necessary changes and include them in the following plugin update.

    Regards

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.