[wp-trac] [WordPress Trac] #47334: _print_styles split styles incorrect when styles name fit in 128 characters

WordPress Trac noreply at wordpress.org
Tue May 21 09:04:28 UTC 2019


#47334: _print_styles split styles incorrect when styles name fit in 128 characters
--------------------------+-----------------------------
 Reporter:  awkwin        |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Media         |    Version:  5.2
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 In this line
 https://github.com/WordPress/WordPress/blob/80aee4ae87343ea3990314c453793d334beb8ebb
 /wp-includes/script-loader.php#L2631 the style string is split every 128
 characters. However, it can result in some edge cases that it leave
 dangling comma that would break load-styles.php

 For example, in my sites

 {{{#!php
 php > $s='dashicons,admin-bar,common,forms,admin-menu,dashboard,list-
 tables,edit,revisions,media,themes,about,nav-menus,wp-pointer,widgets
 ,site-icon,l10n,buttons,wp-auth-check';
 php > print_r(str_split($s,128));
 Array
 (
     [0] => dashicons,admin-bar,common,forms,admin-menu,dashboard,list-
 tables,edit,revisions,media,themes,about,nav-menus,wp-pointer,widgets
     [1] => ,site-icon,l10n,buttons,wp-auth-check
 )
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/47334>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list