[wp-trac] [WordPress Trac] #57318: Coding Standards: Use strict comparison in wp-admin/includes/nav-menu.php

WordPress Trac noreply at wordpress.org
Sun Mar 26 10:03:44 UTC 2023


#57318: Coding Standards: Use strict comparison in wp-admin/includes/nav-menu.php
------------------------------------------+-------------------------------
 Reporter:  jenilk                        |       Owner:  (none)
     Type:  defect (bug)                  |      Status:  new
 Priority:  normal                        |   Milestone:  6.3
Component:  Menus                         |     Version:
 Severity:  normal                        |  Resolution:
 Keywords:  has-patch needs-testing-info  |     Focuses:  coding-standards
------------------------------------------+-------------------------------
Changes (by SergeyBiryukov):

 * milestone:  Awaiting Review => 6.3


Comment:

 Thanks for the patch!

 In my testing, `$_item_object_data['menu-item-db-id']` and `$_POST['menu-
 item-db-id'][ $_key ]` can be a string and need a type cast to `int` for
 correct comparison. The other two changes look good as is to me.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57318#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list