[wp-trac] [WordPress Trac] #16131: PHP notice when adding RSS Widget

WordPress Trac wp-trac at lists.automattic.com
Fri Jan 7 07:04:01 UTC 2011


#16131: PHP notice when adding RSS Widget
--------------------------+------------------------------
 Reporter:  solarissmoke  |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Widgets       |     Version:  3.1
 Severity:  minor         |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------------------

Comment (by nacin):

 I don't think the logic in the patch is proper.

 Here's what it does: if the new instance has a URL, and it is different
 from the old instance URL, then $testurl should be true.

 But what the new logic does, is force the old instance URL to also exist,
 thus making test URL false in the instance where a notice would be
 triggered.

 The proper logic would probably be:
 {{{
 $testurl = ( isset($new_instance['url']) && ( !
 isset($old_instance['url']) || ($new_instance['url'] !=
 $old_instance['url']) ) )
 }}}

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


More information about the wp-trac mailing list