Opened 16 years ago
Closed 15 years ago
#10131 closed defect (bug) (fixed)
Catch-all, 2.8.1 Notice Ticket
Reported by: | sirzooro | Owned by: | |
---|---|---|---|
Milestone: | 2.9 | Priority: | normal |
Severity: | normal | Version: | 2.8 |
Component: | Warnings/Notices | Keywords: | has-patch |
Focuses: | Cc: |
Description
Notice: Undefined variable: time_since in C:\wordpress28.local\wp-content\themes\default\single.php on line 34
This message is displayed when WP 2.8 (with pl_PL translation) uses default template and you open post page.
Attachments (3)
Change History (20)
#3
@
16 years ago
As I promised ;)
One-time notice when you add a Tag Cloud widget:
Notice: Undefined index: title in C:\wordpress28.local\wp-includes\default-widgets.php on line 986
One-time notices when you add Recent Posts widget:
Notice: Undefined index: title in C:\wordpress28.local\wp-includes\default-widgets.php on line 580
Notice: Undefined index: number in C:\wordpress28.local\wp-includes\default-widgets.php on line 581
One-time notices when you add Text widget:
Notice: Undefined index: filter in C:\wordpress28.local\wp-includes\default-widgets.php on line 409
#4
@
16 years ago
- Keywords reporter-feedback added
From single.php:
/* This is commented, because it requires a little adjusting sometimes. You'll need to download this plugin, and follow the instructions: http://binarybonsai.com/wordpress/time-since/ */ /* $entry_datetime = abs(strtotime($post->post_date) - (60*120)); echo time_since($entry_datetime); echo ' ago'; */
Since the code is commented out, it doesn't make sense for PHP to generate a Notice. Would you check your code?
#5
@
16 years ago
- Keywords reporter-feedback removed
- Priority changed from normal to high
- Summary changed from Notice: Undefined variable: time_since to Catch-all, 2.8.1 Notice Ticket
it's still there as an example, so we should probably fix it. the other widgets notices are valid.
#6
@
16 years ago
@peaceablewhale: this is line 34 from single.php in archive with pl_PL translation:
<?php printf(__('This entry was posted %1$s on %2$s at %3$s and is filed under %4$s.', 'kubrick'), $time_since, get_the_time(__('l, F jS, Y', 'kubrick')), get_the_time(), get_the_category_list(', ')); ?>
Main archive (non-localized) doesn't have this problem.
#7
@
16 years ago
Two more notices, after upgrade from 2.7.1 to 2.8:
Notice: Undefined index: title in C:\wordpress.local\wp-includes\default-widgets.php on line 181
Notice: Undefined index: wp_inactive_widgets in C:\wordpress.local\wp-admin\widgets.php on line 105
#10
follow-up:
↓ 12
@
16 years ago
Added admin-footer patch which is for a missing variable warning when the discussions options page is changed. (against 11653)
#12
in reply to:
↑ 10
@
15 years ago
Replying to mrmist:
Added admin-footer patch which is for a missing variable warning when the discussions options page is changed. (against 11653)
I don't think this is necessary currently in trunk as it is always set - even if to a blank string in admin-header.php and doesn't trigger a notice for me.
#14
@
15 years ago
Realted: #10758
I experienced the footer thing as well:
https://core.trac.wordpress.org/attachment/ticket/10758/10758-wp-admin-admin-footer.patch
Since that was an intensive session, I'm pretty shure that warning appeared under multiple circumstances.
I will update the others ticket patches into one against current trunk to make it more useable.
I am testing my plugins to make sure they will work with WP 2.8, and found few more notices. They appear when you add new Categories widget, and are displayed one time only.
Notice: Undefined index: count in C:\wordpress28.local\wp-includes\default-widgets.php on line 486
Notice: Undefined index: hierarchical in C:\wordpress28.local\wp-includes\default-widgets.php on line 487
Notice: Undefined index: dropdown in C:\wordpress28.local\wp-includes\default-widgets.php on line 488
Probably there will be more :)