[wp-trac] [WordPress Trac] #47322: scenario based-bug in the file load-style.php

WordPress Trac noreply at wordpress.org
Mon May 20 01:29:27 UTC 2019


#47322: scenario based-bug in the file load-style.php
--------------------------+-----------------------------
 Reporter:  asimbaki      |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  5.2
 Severity:  normal        |   Keywords:  needs-patch
  Focuses:                |
--------------------------+-----------------------------
 Technically the file load-style.php has a bug, however it is a scenario
 based-bug so it rarely occurred. Not going in to so much details of PHP
 the problem is with the variable $out concatenation of "$contents" used in
 the foreach loop, i.e., O(n) complexity issue - the allocated buffer is
 exhausted assigned by PHP during the single http request execution.

 The better and optimized way is:

 move the "header" just the above "foreach ( $load as $handle )" loop
 statement.
 remove "$out" , i.e., echo $content rather concatenating into $out.

 I had this issue during installing app on my local machine, and solved it
 happily by doing changes that way.

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


More information about the wp-trac mailing list