Opened 13 years ago
Closed 13 years ago
#16131 closed defect (bug) (duplicate)
PHP notice when adding RSS Widget
Reported by: | solarissmoke | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | minor | Version: | 3.1 |
Component: | Widgets | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
When adding an RSS widget to a Widget Area that doesn't already have an RSS widget, you get the following PHP Notice:
PHP Notice: Undefined index: url in wp\wp-includes\default-widgets.php on line 750
Because $old_instance is an empty array.
Attachments (1)
Change History (8)
Note: See
TracTickets for help on using
tickets.
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: