[wp-trac] [WordPress Trac] #25017: Dont allow empty $src parameter in wp_register_script

WordPress Trac noreply at wordpress.org
Tue Aug 13 15:14:52 UTC 2013


#25017: Dont allow empty $src parameter in wp_register_script
--------------------------+------------------------------
 Reporter:  oskarhane     |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  3.6
 Severity:  normal        |  Resolution:
 Keywords:  close         |
--------------------------+------------------------------

Comment (by nacin):

 Technically speaking, you can create an alias or group via an empty 'src'.
 As in, specify a handle and then say it has dependencies of X, Y, and Z.
 Enqueueing this one script then gives you X, Y, and Z. We use this a tiny
 bit in core.

 Perhaps the bug is printing an empty "src" tag (if that's what we're
 doing) in lieu of nothing at all.

 Additionally, perhaps [23378] also needs to check `|| $pagenow === 'wp-
 login.php' && current_filter() !== 'login_enqueue_scripts'`.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25017#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list