[wp-trac] [WordPress Trac] #41988: Strict comparison for JavaScript type of check at line 110 in wp-admin/admin-footer.php

WordPress Trac noreply at wordpress.org
Tue Sep 26 04:29:29 UTC 2017


#41988: Strict comparison for JavaScript type of check at line 110 in wp-admin
/admin-footer.php
-------------------------+-----------------------------
 Reporter:  rnaby        |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  General      |    Version:  trunk
 Severity:  normal       |   Keywords:
  Focuses:               |
-------------------------+-----------------------------
 The `typeof` checking for `wpOnload` variable should use `===` comparison
 operator rather than `==` comparison operator. It'll make variable type
 checking strict.

 Before or now the code is-

 {{{
 <script type="text/javascript">if(typeof
 wpOnload=='function')wpOnload();</script>
 }}}

 After applying the fix, the code is-

 {{{
 <script type="text/javascript">if(typeof
 wpOnload==='function')wpOnload();</script>
 }}}

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


More information about the wp-trac mailing list