Opened 9 years ago
Closed 9 years ago
#35864 closed defect (bug) (fixed)
Calling wptexturize() with trailing less-than symbol causes PHP warning
Reported by: | westonruter | Owned by: | ocean90 |
---|---|---|---|
Milestone: | 4.5 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Formatting | Keywords: | has-patch |
Focuses: | Cc: |
Description
Calling wptexturize( 'foo< )
causes a PHP warning:
Uninitialized string offset: 1
The issue lies in the _wptexturize_pushpop_element
function which is not checking if an array item is set. It needs this change:
- if ( '/' !== $text[1] ) { + if ( isset( $text[1] ) && '/' !== $text[1] ) {
Discovered while testing #27355.
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
In 36578: