[wp-trac] [WordPress Trac] #47307: wp_insert_post: status 'future' is saved although 'publish' selected

WordPress Trac noreply at wordpress.org
Thu Sep 4 12:24:39 UTC 2025


#47307: wp_insert_post: status 'future' is saved although 'publish' selected
-------------------------------+-----------------------------
 Reporter:  daniol             |       Owner:  (none)
     Type:  defect (bug)       |      Status:  closed
 Priority:  normal             |   Milestone:
Component:  Posts, Post Types  |     Version:  2.1
 Severity:  normal             |  Resolution:  worksforme
 Keywords:  has-patch          |     Focuses:  administration
-------------------------------+-----------------------------
Changes (by SirLouen):

 * status:  new => closed
 * version:  5.2 => 2.1
 * resolution:   => worksforme
 * milestone:  Awaiting Review =>


Comment:

 == Reproduction Report
 === Description
 ❌ This report can't validate that the issue can be reproduced.

 === Environment
 - WordPress: 6.9-alpha-60093-src
 - PHP: 8.2.29
 - Server: nginx/1.29.1
 - Database: mysqli (Server: 8.4.6 / Client: mysqlnd 8.2.29)
 - Browser: Chrome 140.0.0.0
 - OS: Windows 10/11
 - Theme: Twenty Twenty 2.9
 - MU Plugins: None activated
 - Plugins:
   * Test Reports 1.2.0

 === Testing Instructions
 1. Change the timezone in Settings > General
 2. Confirm that the server has the same timezone with `date`
 3. Change the title of the site in the Customizer
 4. 👌 Title is changed correctly, the `future` assignment is not
 triggered.

 === Actual Results
 1. ❌ Error condition does not occur anymore.

 === Additional Notes
 1. PHP 7.0 is not supported anymore
 2. Looking at the code, this thing was introduced 20 years ago in
 #2426/[3514]. But it has undergone many changes, including this last one
 [46968], some months after, which could be the culprit.

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


More information about the wp-trac mailing list