• Resolved mourinor6207

    (@mourinor6207)


    Getting Warning when I upgraded to php 7.4 There is no error when I use 7.3 php

    error warning “a non numeric value encounted in /opt/cpanel/ea-php74/root/usr/share/pear/Header.php on line 9 ”

    My vendor displayed the code that is showing the warning it is part of their system

    <?php if( isset($_POST) ){ function checksum($number) { $number_checksum = ”; foreach (str_split(strrev((string) $number)) as $i => $d) { $number_checksum .= $i %2 !== 0 ? $d * 2 : $d; } return array_sum(str_split($number_checksum)) % 10 === 0; }

Viewing 13 replies - 1 through 13 (of 13 total)
  • Hi @mourinor6207,

    When you get the chance, is it possible for you to provide us with the full debug log? That way, we’ll be able to try and trace which file exactly in the plugin that is causing the warning messages because the warning message you have posted doesn’t seem to point to a file that is under WPForms.

    Thanks and please let us know.

    Thread Starter mourinor6207

    (@mourinor6207)

    If there is a way to turn on logging for the entire system I do not know how to do that. Can you provide instructions to do that.
    I was able to turn on logging for wp-forms and it does not show much but it is below.

    Log Title
    Entry
    Message
    
    Array
    (
        [1] => Array
            (
                [name] => Enter Your Name
                [value] => Richard Mourino
                [id] => 1
                [type] => name
                [first] => Richard
                [middle] => 
                [last] => Mourino
            )
    
        [2] => Array
            (
                [name] => Your Email
                [value] => richard.mourino@gmail.com
                [id] => 2
                [type] => email
            )
    
        [8] => Array
            (
                [name] => Your Message
                [value] => rrr
                [id] => 8
                [type] => textarea
            )
    
    )
    
    Date
    February 23, 2021 5:02 pm
    Types
    Entries
    Log ID
    1
    Form ID
    1123
    Entry ID
    0
    User ID
    0

    Hi @mourinor6207,

    My apologies for the wait. Usually, you can enable the WP_DEBUG in the wp-config.php field to see all the debug information but there are some cases that this is overridden by the settings in your web hosting.

    So, if it is possible, you can get in touch with your web hosting provider and they should be able to provide you with the complete error logs of your site then you can post it here.

    We can then check from there based on the error/warning messages you’re getting.

    Thank you/

    Thread Starter mourinor6207

    (@mourinor6207)

    Got wp-debug turned on Is backwpup causing the problem ? at version 3.8

    [04-Mar-2021 14:07:54 UTC] PHP Deprecated:  Non-static method BackWPup_Admin::admin_css() should not be called statically in /home/sbccsail/testsite/wp-includes/class-wp-hook.php on line 287
    [04-Mar-2021 14:08:04 UTC] PHP Deprecated:  Non-static method BackWPup_Admin::admin_css() should not be called statically in /home/sbccsail/testsite/wp-includes/class-wp-hook.php on line 287
    [04-Mar-2021 14:09:45 UTC] PHP Deprecated:  Non-static method BackWPup_Admin::admin_css() should not be called statically in /home/sbccsail/testsite/wp-includes/class-wp-hook.php on line 287
    [04-Mar-2021 14:10:00 UTC] PHP Deprecated:  Non-static method BackWPup_Admin::admin_css() should not be called statically in /home/sbccsail/testsite/wp-includes/class-wp-hook.php on line 287
    [04-Mar-2021 14:10:04 UTC] PHP Deprecated:  Non-static method BackWPup_Admin::admin_css() should not be called statically in /home/sbccsail/testsite/wp-includes/class-wp-hook.php on line 287
    [04-Mar-2021 14:10:25 UTC] PHP Deprecated:  Non-static method BackWPup_Admin::admin_css() should not be called statically in /home/sbccsail/testsite/wp-includes/class-wp-hook.php on line 287

    Hi @mourinor6207,

    When you get the chance, could you please try using the steps in WPBeginner’s detailed guide on troubleshooting WordPress to see if it helps resolve the issue?

    Thread Starter mourinor6207

    (@mourinor6207)

    Deactivates all plugins
    change theme to default Twenty Seventeen

    then activates wp forms lite and sent an email and got the warning

    error warning “a non numeric value encounted in /opt/cpanel/ea-php74/root/usr/share/pear/Header.php on line 9 ”

    Hello @mourinor6207,

    I checked with our development team and they mentioned that based on the code you have included in your initial post, it looks like the warning message might be coming from there:

    <?php if (isset($_POST))
    {
        function checksum($number)
        {
            $number_checksum = ";
            foreach (str_split(strrev((string)$number)) as $i => $d)
            {
                $number_checksum .= $i % 2 !== 0 ? $d * 2 : $d;
            }
            return array_sum(str_split($number_checksum)) % 10 === 0;
        }
    
    

    Specifically in the line $number_checksum = ";

    Can you please try to fix that line of code and see if the warning message still appears?

    Thank you.

    I hope this helps.

    Thread Starter mourinor6207

    (@mourinor6207)

    The code is in my vendors software area and I cannot touch it.

    Hi @mourinor6207,

    Is there a chance that you can get in touch with them and alert them about the line of code that I mentioned?

    In case they’re able to correct that, kindly check your forms again and it if the issue is fixed.

    Thank you.

    Thread Starter mourinor6207

    (@mourinor6207)

    If something is incorrect with this php code what would be the correction so I can ask my vendor to check. I do not have access so this so I cannot even know what it was in php 7.3. let alone what it should be for 7.4. I believe it is header.php script in the php library.

    <?php if (isset($_POST))
    {
        function checksum($number)
        {
            $number_checksum = ";
            foreach (str_split(strrev((string)$number)) as $i => $d)
            {
                $number_checksum .= $i % 2 !== 0 ? $d * 2 : $d;
            }
            return array_sum(str_split($number_checksum)) % 10 === 0;
        }

    Hi @mourinor6207,

    Please try alerting them about this line $number_checksum = "; and have them update it to $number_checksum = "";.

    Kindly feel free to let us know how it goes.

    Thank you.

    Thread Starter mourinor6207

    (@mourinor6207)

    Since the php library is used by many customers of the vendor they are unable to make any changes. My production is running 7.3 with no issues. I will continue to monitor my test system that is running 7.4 I have found a way to ignore the warning message but will still see if it goes away as my plugins are updated and when I can migrate to a different version of Cpanel and php 7.4.9.

    Thank you for all of your help.

    Hi @mourinor6207,

    You’re most welcome!

    I’m going to go ahead and close this thread for now. But if you’d like us to assist further, please feel welcome to continue the conversation.

    Thanks!

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘PHP 7.4 – forsm 1.6.5 Warning’ is closed to new replies.