Opened 11 years ago
Closed 11 years ago
#35864 closed defect (bug) (fixed)
Calling wptexturize() with trailing less-than symbol causes PHP warning
| Reported by: | westonruter | Owned by: | ocean90 |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.5 |
| Component: | Formatting | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
In 36578: