[wp-trac] [WordPress Trac] #26671: dashboard activity notice: A non well formed numeric value encountered

WordPress Trac noreply at wordpress.org
Wed Dec 18 11:50:42 UTC 2013


#26671: dashboard activity notice: A non well formed numeric value encountered
--------------------------+-----------------------------
 Reporter:  ruud@…        |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  trunk
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 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.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/26671>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list