#26671 closed defect (bug) (invalid)
dashboard activity notice: A non well formed numeric value encountered
Reported by: | Owned by: | ||
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.9 |
Component: | Administration | Keywords: | |
Focuses: | Cc: |
Description
Hi all,
I stumbled upon this notice in the new Dashboard Activity panel, but couldn't find any related bug (yet) so posting it here anyway.
Notice: A non well formed numeric value encountered in /htdocs/wp-admin/includes/dashboard.php on line 603
Looking at it, it seems that
$time = get_the_time( 'U' ); shouldn't be used in this case, because $time will be a string instead of an integer.
On the next line:
if ( date( 'Y-m-d', $time ) == $today ) {
$time is used, and should be an numeric, and clearly isn't.
I'm guessing that get_the_time( 'U' ); is used to receive the current Unix epoch.
If that is supposed to be the case, then the patch added will solve this.
Attachments (1)
Change History (11)
#5
@
11 years ago
- Keywords needs-patch added; has-patch dev-feedback removed
The patch doesn't work since the function is used to retrieve the time of a post and not the current time.
Not sure why get_the_time() did return a string.
#6
@
11 years ago
Ah I see, that makes sense indeed.
get_the_time() is supposed to return a string, or was is recently changed as well?
wp_dashboard_recent_posts patch