Make WordPress Core

Ticket #58476: 58476-1.diff

File 58476-1.diff, 740 bytes (added by nihar007, 2 years ago)

I added a checking in if condition

  • src/wp-includes/formatting.php

    diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php
    index 9ea2b9f8fa..0f27838a09 100644
    a b function translate_smiley( $matches ) { 
    34773477function convert_smilies( $text ) {
    34783478        global $wp_smiliessearch;
    34793479        $output = '';
    3480         if ( get_option( 'use_smilies' ) && ! empty( $wp_smiliessearch ) ) {
     3480        if ( get_option( 'use_smilies' ) && ! empty( $wp_smiliessearch ) && ! empty( $text ) ) {
    34813481                // HTML loop taken from texturize function, could possible be consolidated.
    34823482                $textarr = preg_split( '/(<.*>)/U', $text, -1, PREG_SPLIT_DELIM_CAPTURE ); // Capture the tags as well as in between.
    34833483                $stop    = count( $textarr ); // Loop stuff.