• Sabuj Kundu

    (@manchumahara)


    Hi,

    Getting this php error
    Notice: A non well formed numeric value encountered in project_root\wp-content\plugins\wp-megamenu\classes\class.wp-megamenu-base.php on line 780

    PHP version: PHP version: 7.2.3
    WordPress: current latest

Viewing 4 replies - 1 through 4 (of 4 total)
  • Nayeem

    (@nayeeem)

    Hello @manchumahara

    Nice to meet you. We are unable to find this type of issue on our side. Can you please send us a screenshot of where the problem is arising?

    Please for faster support kindly send your query to [email protected] referring to this issue.

    Thanks. Looking forward to hearing from you

    Thread Starter Sabuj Kundu

    (@manchumahara)

    With the latest version 1.3.5
    wp-content\plugins\wp-megamenu\classes\class.wp-megamenu-base.php on line 836

    variable $options[‘options’][‘strees_row_width’] returns something like 1360px which is a not an integer you can see and that line is
    $style .= “left: calc(100% – “.($options[‘options’][‘strees_row_width’] / 2).”px – 20px) !important”;

    So $options[‘options’][‘strees_row_width’] / 2 is giving the error as you are trying to divide a string by 2.

    intval($options[‘options’][‘strees_row_width’]) / 2 can be a quick fix or full line
    $style .= “left: calc(100% – “.(intval($options[‘options’][‘strees_row_width’]) / 2).”px – 20px) !important”;

    While working enable debug mode you will also find such php error in for setting something related ‘strees_row_width’

    Hope that helps.

    Thread Starter Sabuj Kundu

    (@manchumahara)

    BTW, user can put width with ‘px’ so, it’s better to intval to avoid error.

    Nayeem

    (@nayeeem)

    Hello @manchumahara

    Thanks for notifying about the problem and also paving a way to fix the problem…

    Yes, it is working only with the integer value. After adding any strings like ‘px‘ it becomes no functional.

    We are gonna fix it as early as possible in the next update…

    Have a nice day. Thank you again

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘php error’ is closed to new replies.