• Scroll down to the bottom of the related website. Using Elementor, I placed a WP Search widget on the corresponding page and this is the error I get on preview:

    This error is above the search bar:
    Warning: Trying to access array offset on value of type null in /homepages/23/d912294510/htdocs/clickandbuilds/Beats/wp-includes/widgets/class-wp-widget-search.php on line 49

    and this one is below it:
    Warning: Trying to access array offset on value of type null in /homepages/23/d912294510/htdocs/clickandbuilds/Beats/wp-includes/widgets/class-wp-widget-search.php on line 57

    This search bar does work but I get that error message. The search bars on the sidebars work as well but don’t show this error. Any suggestions?

    • This topic was modified 2 years, 5 months ago by Ron Valmont.
    • This topic was modified 2 years, 5 months ago by Ron Valmont.
    • This topic was modified 2 years, 5 months ago by Ron Valmont.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Ron Valmont

    (@yeous)

    Here is the source code block which includes lines 49 and 57 as well as everything between:

    public function widget( $args, $instance ) {
    		$title = ! empty( $instance['title'] ) ? $instance['title'] : '';
    
    		/** This filter is documented in wp-includes/widgets/class-wp-widget-pages.php */
    		$title = apply_filters( 'widget_title', $title, $instance, $this->id_base );
    
    49----		echo $args['before_widget'];
    		if ( $title ) {
    			echo $args['before_title'] . $title . $args['after_title'];
    		}
    
    		// Use active theme search form if it exists.
    		get_search_form();
    
    57----		echo $args['after_widget'];
    	}
    • This reply was modified 2 years, 5 months ago by Ron Valmont.
    • This reply was modified 2 years, 5 months ago by Ron Valmont.
    Thread Starter Ron Valmont

    (@yeous)

    Installing HT Mega and using their Search widget doesn’t give me an error message. That is one work-around but I don’t want to use plugins to replace native widgets. This is not audio mixing where ProQ is every DAWs native EQ replacemnt.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Search Bar Widget Error’ is closed to new replies.