[wp-trac] [WordPress Trac] #59827: wp_save_post_revision() assumes ALL post meta is text! Fatal error in PHP 8.2.

WordPress Trac noreply at wordpress.org
Thu Nov 9 17:09:40 UTC 2023


#59827: wp_save_post_revision() assumes ALL post meta is text! Fatal error in PHP
8.2.
-----------------------------------------+--------------------------------
 Reporter:  jsmoriss                     |       Owner:  adamsilverstein
     Type:  defect (bug)                 |      Status:  assigned
 Priority:  normal                       |   Milestone:  Awaiting Review
Component:  Revisions                    |     Version:  6.3.2
 Severity:  normal                       |  Resolution:
 Keywords:  reporter-feedback has-patch  |     Focuses:  php-compatibility
-----------------------------------------+--------------------------------
Changes (by adamsilverstein):

 * owner:  (none) => adamsilverstein
 * status:  new => assigned


Comment:

 @jsmoriss

 Thanks for reporting (plus demo and PR!), I'll take a closer look at this.
 It looks like your plugin still returns a string for the
 '_wp_post_revision_field_' . meta_key filter, so it doesn't make sense
 that it triggers this error, I'll have to dig in further to see why. Also,
 I suspect this issue exists in older versions of WordPress, the meta
 revisions just made it easier to see.

 In any case, I agree having some handling here for non string values would
 be an improvement.

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


More information about the wp-trac mailing list