| | 6 | |
| | 7 | |
| | 8 | ---- |
| | 9 | |
| | 10 | Barry's description: |
| | 11 | |
| | 12 | How to replicate: |
| | 13 | |
| | 14 | 1) Publish a post with a date in the future |
| | 15 | |
| | 16 | 2) Edit that post and change the timestamp to a date further in the future and save the post |
| | 17 | |
| | 18 | If you check the database, you will see that the timestamps have been updated correctly in the posts table, but in the options table, the cron option contains 2 objects in the array -- one with the old timestamp and one with the new one. When wp-cron runs, it checks that option and sees the older timestamp and therefore publishes the post at the incorrect time. |
| | 19 | |
| | 20 | What should happen: |
| | 21 | |
| | 22 | When the timestamp of a future post is changed, the entry in the cron option should be replaced, not appended to. |
| | 23 | |
| | 24 | ---- |