Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
  • #1262553


    My error_log is filled with these:

    A non-numeric value encountered in themes/enfold/config-templatebuilder/avia-shortcodes/slideshow_layerslider/slideshow_layerslider.php on line 146

    Any assistance would be appreciated. Thanks!

    WP 5.5.3
    PHP 7.4.12


    Hey perfectword,

    Can you try to downgrade your PHP version to 7.3?
    Enfold was released August 15th this year while PHP 7.4.12 was released in Oct. 29 this year, maybe there’s some incompatibility with it.

    Best regards,


    PHP 7.4 as a major release has been around since November 2019.

    Also, PHP 7.4 is the recommended version for WordPress.


    Hi perfectword,

    Is it notice or a warning?

    Best regards,


    [24-Nov-2020 16:52:31 UTC] PHP Warning: A non-numeric value encountered in /home/user/domain/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/slideshow_layerslider/slideshow_layerslider.php on line 146


    Hi perfectword,

    You can set the error level reporting to be for errors only, and so this warning will not be spamming your log.

    Here is an article for you:

    Best regards,


    Line 146 of /home/user/domain/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/slideshow_layerslider/slideshow_layerslider.php is

    $params['style'] = " style='height: " . ( $height + 1 ) . "px;' ";

    So, no one wants to venture a guess as to what is causing the php error “A non-numeric value encountered”? Might the error be caused by something we have programmed incorrectly into our slider? Is it something systemically wrong with Enfold coding in this file?

    Should the error not be fixed or addressed, rather than ignored?




    What is the value of the $height variable? It is possible that the height value contains the measurement unit px or the value is in string format, which is why it throws the notice or error. Try to use the intval function to make sure that the actual integer value is extracted from the variable.



    intval($height) + 1

    Best regards,


    Thank you, Ismael.

    Are you suggesting I edit slideshow_layerslider.php ?

    I looked at the height as set in wp-admin/admin.php?page=layerslider&action=edit&id=2#slider-settings > Canvas Height

    I only have whole numbers set there. No units of measurement.



    Are you suggesting I edit slideshow_layerslider.php ?

    Yes, you have to dump the value of the $height variable to check it, or add a breakpoint to the line if you are using any debugging extension in your code editor. The format of the value there might be different compare to the value in the settings panel.


    Did you try the suggested modification above?

    Best regards,


    That appears to have worked.

    I deleted the error_log, made the suggested change in slideshow_layerslider.php, cleared my browser cache, accessed the site on desktop and mobile. No new error_log was created.

    Will this be fixed in a future version of Enfold?

    Thanks for the help!


    Hi perfectword,

    Glad you got it working for you! :)

    Yes, the issue will be fixed.

    If you need further assistance please let us know.

    Best regards,

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