[wp-trac] [WordPress Trac] #52996: Coding standard : Undefined varible $results

WordPress Trac noreply at wordpress.org
Thu Apr 8 11:10:32 UTC 2021


#52996: Coding standard : Undefined varible $results
--------------------------+-------------------------------
 Reporter:  ravipatel     |       Owner:  SergeyBiryukov
     Type:  defect (bug)  |      Status:  closed
 Priority:  low           |   Milestone:  5.8
Component:  Import        |     Version:  3.0
 Severity:  trivial       |  Resolution:  fixed
 Keywords:  has-patch     |     Focuses:  coding-standards
--------------------------+-------------------------------
Changes (by SergeyBiryukov):

 * owner:  (none) => SergeyBiryukov
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"50692" 50692]:
 {{{
 #!CommitTicketReference repository="" revision="50692"
 Coding Standards: Remove unnecessary `unset()` calls in `WP_Importer`
 methods.

 Variables created within the scope of a function are discarded
 automatically when PHP leaves the scope of the function, i.e. on `return`,
 so doing a call to `unset()` straight before a `return` statement is
 redundant.

 Props jrf, ravipatel, rachelbaker, mukesh27.
 Fixes #52996.
 }}}

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


More information about the wp-trac mailing list