[wp-trac] [WordPress Trac] #41981: link-template.php: if ($x = $y ) vs if ($x == $y)

WordPress Trac noreply at wordpress.org
Mon Sep 25 16:21:52 UTC 2017


#41981: link-template.php: if ($x = $y ) vs if ($x == $y)
--------------------------+-----------------------------
 Reporter:  danimalbrown  |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  4.8.2
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 While reading through the code I came across line 189 of wp-includes/link-
 template.php (WordPress 4.8.2):

 {{{#!php
 if ( $parent = $category_object->parent )
 }}}

 I don't have a behavior to reflect this but it looks like the common bug
 where the incorrect single equals sign appears in a conditional.  There
 should probably be 2 or 3 equal signs here.

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


More information about the wp-trac mailing list