[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
Tue Nov 7 18:22:49 UTC 2023


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

Comment (by jsmoriss):

 Replying to [comment:11 jorbin]:
 > It [https://wpdirectory.net/search/01HENFA1JHZG744ZP1PQ679GB7 looks]
 like the `_wpsso_meta` field is coming from
 https://wordpress.org/plugins/wpsso/ which in the 16.6.0 version isn't
 using `register_post_meta`, `register_meta`, or the
 `_wp_post_revision_fields` filter.
 >
 > Do you have a minimal code example that can be used to replicate the
 issue? Ideally something small that can be installed as an mu-plugin or an
 automated test.

 Registering post meta for revisions is scheduled for the next release of
 WPSSO Core.

 Registering the post meta:

 https://github.com/surniaulula/wpsso/blob/master/lib/abstract/wp-
 meta.php#L278

 Adding the revision comparison title:

 https://github.com/surniaulula/wpsso/blob/master/lib/abstract/wp-
 meta.php#L292

 Adding the comparison of the two arrays (post and revision meta data):

 https://github.com/surniaulula/wpsso/blob/master/lib/abstract/wp-
 meta.php#L309

 The arrays do need to be converted to text for the comparison diff:

 https://github.com/surniaulula/wpsso/blob/master/lib/abstract/wp-
 meta.php#L329

 I don't have time to write a simple plugin to trigger this issue today,
 but hopefully in the next few days.

 js.

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


More information about the wp-trac mailing list