• Sourav Pan

    (@microbiologynote)


    Deprecated: stripos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /home/u554146333/domains/microbiologynote.com/public_html/wp-includes/functions.wp-styles.php on line 90

    Here is the ss

    https://prnt.sc/0DndMiMDANDc

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Sourav Pan

    (@microbiologynote)

    Here is the code

    function wp_add_inline_style( $handle, $data ) {
    	_wp_scripts_maybe_doing_it_wrong( __FUNCTION__, $handle );
    
    	if ( false !== stripos( $data, '</style>' ) ) {
    		_doing_it_wrong(
    			__FUNCTION__,
    			sprintf(
    				/* translators: 1: <style>, 2: wp_add_inline_style() */
    				__( 'Do not pass %1$s tags to %2$s.' ),
    				'<code>&lt;style&gt;</code>',
    				'<code>wp_add_inline_style()</code>'
    			),
    			'3.7.0'
    		);
    		$data = trim( preg_replace( '#<style[^>]*>(.*)</style>#is', '$1', $data ) );
    	}
    
    	return wp_styles()->add_inline_style( $handle, $data );
    }

    The bolded line is 90 number code, which is showing in error msg

    Leo

    (@leohsiang)

    Hi there,

    The wp-includes folder is from WordPress itself so this wouldn’t be a theme related issue. I would recommend checking with the WP support team.

    For what it’s worth, we’ve been using PHP8.1 for awhile and haven’t encountered this issue before and I can’t recall other reports on this.

    Might be something specific to your install.

    Hope this helps ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Showing this error when updated to php 8.1’ is closed to new replies.