Opened 16 years ago
Closed 16 years ago
#10225 closed defect (bug) (fixed)
Various php notices in default-widgets.php
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 2.9 | Priority: | normal |
Severity: | minor | Version: | 2.9 |
Component: | Warnings/Notices | Keywords: | |
Focuses: | Cc: |
Description
The attached fixes various undefined index notices which appear when wp_debug is enabled and the widgets page is visited with various widgets and widget titles.
Attachments (1)
Change History (10)
#4
@
16 years ago
nit picking, but things like this:
$count = isset($instance['count']) ? (bool) $instance['count'] :false;
could also be written like:
$count = isset($instance['count']) && $instance['count'];
#5
@
16 years ago
I got an E_NOTICE with (with my version of a fix)
class WP_Widget_Search extends WP_Widget { ..... function widget( $args, $instance ) { ..... // $title = apply_filters('widget_title', $instance['title']); $title = apply_filters('widget_title', empty($instance['title']) ? __('Search') : $instance['title']);
And I haven't figured out how to fix this one yet
class WP_Widget_Text extends WP_Widget { ..... function widget( $args, $instance ) {
which has an index not defined for $instancefilter?
Note: See
TracTickets for help on using
tickets.
That logic is wrong, Well, I mean the bracketing is.
Should be: