diff --git src/wp-includes/formatting.php src/wp-includes/formatting.php
index 89ecbbe..01b6405 100644
|
|
function wptexturize_primes( $haystack, $needle, $prime, $open_quote, $close_quo |
374 | 374 | */ |
375 | 375 | function _wptexturize_pushpop_element( $text, &$stack, $disabled_elements ) { |
376 | 376 | // Is it an opening tag or closing tag? |
377 | | if ( '/' !== $text[1] ) { |
| 377 | if ( isset( $text[1] ) && '/' !== $text[1] ) { |
378 | 378 | $opening_tag = true; |
379 | 379 | $name_offset = 1; |
380 | 380 | } elseif ( 0 == count( $stack ) ) { |
diff --git tests/phpunit/tests/formatting/WPTexturize.php tests/phpunit/tests/formatting/WPTexturize.php
index 4d7caf3..afd323e 100644
|
|
String with a number followed by a single quote !q1!Expendables 3!q1! vestibulum |
2073 | 2073 | return $this->assertLessThan( 200, $result ); |
2074 | 2074 | } |
2075 | 2075 | |
| 2076 | /** |
| 2077 | * Ensure that a trailing less-than symbol doesn't cause a PHP warning. |
| 2078 | * |
| 2079 | * @ticket 35864 |
| 2080 | */ |
| 2081 | function test_trailing_less_than() { |
| 2082 | $this->assertEquals( 'F–oo<', wptexturize( 'F--oo<', true ) ); |
| 2083 | } |
| 2084 | |
2076 | 2085 | function data_whole_posts() { |
2077 | 2086 | require_once( DIR_TESTDATA . '/formatting/whole-posts.php' ); |
2078 | 2087 | return data_whole_posts(); |