Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1487014

    Hi Kriesi Team,

    I have noticed a PHP warning appearing in the file:
    config-templatebuilder/avia-shortcodes/search/search.php (line 816):

    Warning: Undefined variable $ajax_container
    After some investigation, it seems the issue is caused by the variable $ajax_container being used without prior initialization.

    The relevant code snippet is:

    if( 'custom' == $atts['ajax_location'] && $atts['ajax_container'] !== '' )
    {
        $results_container_attr = " data-ajaxcontainer='{$ajax_container}'";
    }

    Here, $atts[‘ajax_container’] is checked but $ajax_container (without $atts) is used, which is undefined, triggering the warning.

    Proposed fix:

    Replace
    $results_container_attr = " data-ajaxcontainer='{$ajax_container}'";

    with
    $results_container_attr = " data-ajaxcontainer='{$atts['ajax_container']}'";

    This change should eliminate the warning and correctly reference the intended value.

    Please consider integrating this fix in a future update.

    Thanks for your great work on the theme!

    • This topic was modified 1 day ago by pretuziano.
    #1487017

    Hey pretuziano,
    Thank you for pointing this out, we had someone else point out a simulator issue for “PHP Deprecated” which I posted to the Dev Team today:
    https://github.com/KriesiMedia/Enfold-Feature-Requests/issues/141
    Feel free to add to it or join it for further updates as the Dev Team reviews it.

    Best regards,
    Mike

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