diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index ab3be7a76c..d71924fdd1 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -274,6 +274,8 @@ function _wptexturize_pushpop_element($text, &$stack, $disabled_elements, $openi array_push($stack, $matches[1]); } + } elseif ( 0 == count( $stack ) ) { + // Stack is empty. Just stop. } else { // Closing? Check $text+2 against disabled elements $c = preg_quote($closing, '/');