Changeset 13525 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/readme/class-parser.php
- Timestamp:
- 04/15/2024 07:39:37 AM (15 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/readme/class-parser.php
r13523 r13525 555 555 if ( 'words' === $type ) { 556 556 // Split by whitespace, capturing it so we can put it back together. 557 $pieces = preg_split( '/(\s+)/u', $desc, -1, PREG_SPLIT_DELIM_CAPTURE ); 557 $pieces = @preg_split( '/(\s+)/u', $desc, -1, PREG_SPLIT_DELIM_CAPTURE ); 558 559 // In the event of an error (Likely invalid UTF8 data), perform the same split, this time in a non-UTF8 safe manner, as a fallback. 560 if ( $pieces === false ) { 561 $pieces = preg_split( '/(\s+)/', $desc, -1, PREG_SPLIT_DELIM_CAPTURE ); 562 } 558 563 559 564 $word_count_with_spaces = $length * 2;
Note: See TracChangeset
for help on using the changeset viewer.