• Resolved akera099

    (@akera099)


    Hello,

    I’ve encountered this issue with the Mailgun plugin when adding the Subscription widget with the shortcode.
    Screencap

    List id is as follows:

    
    test_mailing_list@sandbox#############################.mailgun.org
    

    I’ve made a fresh install of WP with a new database and the error still persist. Tried on version 1.7.4 and 1.7.6. Any idea what might be causing this? The plugin itself can send emails without issues.

    • This topic was modified 4 years ago by akera099.
    • This topic was modified 4 years ago by akera099.
    • This topic was modified 4 years ago by akera099.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter akera099

    (@akera099)

    Tested with PHP 7.4; WordPress 5.6.2, 5.5.3, 5.5.1, 5.5.0. The only way to make this error go away was to use PHP 7.0.33.

    Fix/Patch: The line 431 should be updated from:

    $args[ ‘widget_id’ ] = md5(rand(10000, 99999) + $atts[ ‘id’ ]);

    It is trying to add integer with a string ($atts[‘id’] is a string, the email address of the list).

    therefor just change + => . (concatenate strings)

    $args[ ‘widget_id’ ] = md5(rand(10000, 99999) . $atts[ ‘id’ ]);

    and anyhow it is md5 – so it creates a unique id – so no logic is changed.

    Thread Starter akera099

    (@akera099)

    @idokd

    This fix has worked! From someone that is still a beginner in terms of coding, thank you very, very much!

    I do hope they patch it since it is already coming in various past versions where I manually fix it (OCD) @mailgun

    Plugin Author Mailgun

    (@mailgun)

    Thanks y’all, we’ll get this patched soon!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Non-numeric value encountered in mailgun.php line 431’ is closed to new replies.