[wp-trac] [WordPress Trac] #44979: Parameter 1 to wp_default_styles() expected to be a reference, value given

WordPress Trac noreply at wordpress.org
Fri Sep 21 13:48:32 UTC 2018


#44979: Parameter 1 to wp_default_styles() expected to be a reference, value given
---------------------------+-----------------------------
 Reporter:  jqz            |      Owner:  (none)
     Type:  defect (bug)   |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  Script Loader  |    Version:  4.9.8
 Severity:  normal         |   Keywords:
  Focuses:                 |
---------------------------+-----------------------------
 This is a follow-up to #37772.

 The bug still manifests if the UOPZ extension is loaded.

 (It is a PHP warning, so functionality is okay, but log files will get
 cluttered and performance hit as server writes to log file on each page
 request.)

 Environment:
 - Windows 10 x64
 - Apache 2.4.27
 - PHP 7.1.9 VC14-x64 Thread Safe
 - UOPZ extension 5.0.2 (PHP 7.1 Thread Safe x64 -
 https://pecl.php.net/package/uopz/5.0.2/windows)

 Fresh install of WordPress 4.9.8.

 It can be fixed by removing the `&` from the function parameter
 declaration for `wp_default_styles()` and `wp_default_scripts()` - the `&`
 is not required as the parameter is an object and thus the original object
 is referenced in any case.

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


More information about the wp-trac mailing list