[wp-trac] [WordPress Trac] #64496: Uncaught Error: gmdate(): Argument #2 ($timestamp) must be of type ?int, string given in wp-admin/includes/dashboard.php on line 1017

WordPress Trac noreply at wordpress.org
Mon Jan 12 19:38:07 UTC 2026


#64496: Uncaught Error: gmdate(): Argument #2 ($timestamp) must be of type ?int,
string given in wp-admin/includes/dashboard.php on line 1017
------------------------------------------------+--------------------------
 Reporter:  vanhoucke                           |       Owner:  (none)
     Type:  defect (bug)                        |      Status:  new
 Priority:  normal                              |   Milestone:  Awaiting
                                                |  Review
Component:  Administration                      |     Version:  6.9
 Severity:  normal                              |  Resolution:
 Keywords:  php8.3 has-patch reporter-feedback  |     Focuses:  ui, php-
                                                |  compatibility
------------------------------------------------+--------------------------
Changes (by westonruter):

 * keywords:  php8.3 has-patch => php8.3 has-patch reporter-feedback


Comment:

 I'm not able to reproduce this issue. For me on PHP 8.3, `get_the_time(
 'U' )` ''does'' return an `int`. Do you have a `get_the_time` filter that
 is returning something else?

 See on [https://playground.wordpress.net/php-
 playground.html#eyJjb2RlIjoiPD9waHBcbmhlYWRlcignY29udGVudC10eXBlOnRleHQvcGxhaW4nKTtcbmVjaG8gXCJIZWxsbyBmcm9tIFBIUCBcIiAuIHBocHZlcnNpb24oKTtcblxuZWNobyBcIlxcblxcblwiO1xuXG4vLyBXb3JkUHJlc3MgaXMgYXZhaWxhYmxlIGlmIHlvdSBuZWVkIGl0IVxucmVxdWlyZSAnL3dvcmRwcmVzcy93cC1sb2FkLnBocCc7XG5cbmdsb2JhbCAkcG9zdDtcbiRwb3N0ID0gZ2V0X3Bvc3RzKClbMF07XG4kdGltZSA9IGdldF90aGVfdGltZSggJ1UnICk7XG5lY2hvIFwiZ2V0X3RoZV90aW1lKCAnVScgKSA9PT0gXCI7XG52YXJfZHVtcCggJHRpbWUgKTsiLCJwaHAiOiI4LjQiLCJ3cCI6IjYuOSJ9
 PHP Playground]:

 {{{#!php
 <?php
 global $post;
 $post = get_posts()[0];
 $time = get_the_time( 'U' );
 echo "get_the_time( 'U' ) === ";
 var_dump( $time );
 }}}

 Results in:


 {{{
 get_the_time( 'U' ) === int(1764702503)
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/64496#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list