• Resolved mrsimonhagger

    (@mrsimonhagger)


    I have a fatal error occuring on the admin page when trying to create a new or edit an existing form.

    Details are below:

    Error Details

    =============

    An error of type E_ERROR was caused in line 129 of the file /home/storage/321/3907321/user/htdocs/wp-content/plugins/official-mailerlite-sign-up-forms/src/Controllers/AdminController.php. Error message: Uncaught TypeError: array_filter(): Argument #1 ($array) must be of type array, bool given in /home/storage/321/3907321/user/htdocs/wp-content/plugins/official-mailerlite-sign-up-forms/src/Controllers/AdminController.php:129

    Stack trace:

    #0 /home/storage/321/3907321/user/htdocs/wp-content/plugins/official-mailerlite-sign-up-forms/src/Controllers/AdminController.php(129): array_filter(false, Object(Closure))

    #1 /home/storage/321/3907321/user/htdocs/wp-includes/class-wp-hook.php(308): MailerLiteForms\Controllers\AdminController::forms(”)

    #2 /home/storage/321/3907321/user/htdocs/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(”, Array)

    #3 /home/storage/321/3907321/user/htdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array)

    #4 /home/storage/321/3907321/user/htdocs/wp-admin/admin.php(259): do_action(‘toplevel_page_m…’)

    #5 {main}   thrown

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter mrsimonhagger

    (@mrsimonhagger)

    Further detail:

    WordPress version 6.1.1

    Active theme: Avada (version 7.8.2) Current plugin: MailerLite – Signup forms (official) (version 1.6.1) PHP version 8.0.28

    Plugin Author MailerLite

    (@mailerlite)

    Hi @mrsimonhagger,

    It is a known issue and will be fixed in the next update which is scheduled for early next week.

    Can you confirm that you have groups creates in your MailerLite account?

    Regards,

    Leopold

    Thread Starter mrsimonhagger

    (@mrsimonhagger)

    Thank you for the notification. I can confirm that there are multiple Signup forms if that is what you are referencing as groups.

    Look forward to your update.

    Thread Starter mrsimonhagger

    (@mrsimonhagger)

    Unfortunately the update to version 1.6.6 has resulted in a new error being thrown:

    WordPress version 6.1.1
    
    Active theme: Avada (version 7.9.2)
    
    Current plugin: MailerLite - Signup forms (official) (version 1.6.6) PHP version 8.0.28
    
    Error Details
    
    =============
    
    An error of type E_ERROR was caused in line 128 of the file /home/storage/321/3907321/user/htdocs/wp-content/plugins/official-mailerlite-sign-up-forms/src/Controllers/AdminController.php. Error message: Uncaught TypeError: array_filter(): Argument #1 ($array) must be of type array, bool given in /home/storage/321/3907321/user/htdocs/wp-content/plugins/official-mailerlite-sign-up-forms/src/Controllers/AdminController.php:128
    
    Stack trace:
    
    #0 /home/storage/321/3907321/user/htdocs/wp-content/plugins/official-mailerlite-sign-up-forms/src/Controllers/AdminController.php(128): array_filter(false, Object(Closure))
    
    #1 /home/storage/321/3907321/user/htdocs/wp-includes/class-wp-hook.php(308): MailerLiteForms\Controllers\AdminController::forms('')
    
    #2 /home/storage/321/3907321/user/htdocs/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array)
    
    #3 /home/storage/321/3907321/user/htdocs/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
    
    #4 /home/storage/321/3907321/user/htdocs/wp-admin/admin.php(259): do_action('toplevel_page_m...')
    
    #5 {main}
    
      thrown
    Thread Starter mrsimonhagger

    (@mrsimonhagger)

    I have been trying to debug this error using a local copy of the site. Digging through the plugin code I **think** that the issue is that the MailerLiteAPI.php function to Parse responses returns either the response itself or a boolean of false.

    This means that there are multiple points in the code that rely on a returned (parsed) response but don’t initiate a safety check first to see if the response is false from the expected return of an array of items.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Fatal error on AdminController’ is closed to new replies.