[wp-trac] [WordPress Trac] #53858: PHP 8.1: syntax error due to new 'readonly' property

WordPress Trac noreply at wordpress.org
Mon Aug 2 14:24:12 UTC 2021


#53858: PHP 8.1: syntax error due to new 'readonly' property
----------------------------------------------+---------------------
 Reporter:  haosun                            |       Owner:  (none)
     Type:  defect (bug)                      |      Status:  new
 Priority:  normal                            |   Milestone:  5.9
Component:  General                           |     Version:  4.9
 Severity:  normal                            |  Resolution:
 Keywords:  needs-patch php81 needs-dev-note  |     Focuses:
----------------------------------------------+---------------------
Changes (by ayeshrajans):

 * Attachment "53858.patch" added.

 Suggesting this patch. It renames `readonly` to `wp_readonly`, and
 conditionally includes a `./PHP_Compat/readonly.php` file on PHP < 8.1,
 which declares a `readonly` func that calls `wp_readonly`.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/53858>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list