[wp-trac] [WordPress Trac] #44416: `compact()` will throw notice for undefined variables in PHP 7.3

WordPress Trac noreply at wordpress.org
Fri Oct 26 20:16:25 UTC 2018


#44416: `compact()` will throw notice for undefined variables in PHP 7.3
---------------------------------------------+-----------------------------
 Reporter:  desrosj                          |       Owner:  SergeyBiryukov
     Type:  defect (bug)                     |      Status:  reopened
 Priority:  normal                           |   Milestone:  5.0
Component:  General                          |     Version:
 Severity:  normal                           |  Resolution:
 Keywords:  needs-testing php73 needs-patch  |     Focuses:
---------------------------------------------+-----------------------------

Comment (by jorbin):

 In [changeset:"43832" 43832]:
 {{{
 #!CommitTicketReference repository="" revision="43832"
 php7.3 compatibility: Fix compact throwing notices for multisite

 In PHP 7.3, the compact() function has been changed to issue an E_NOTICE
 level error if a passed string refers to an unset variable. In previous
 versions of PHP, this notice was silently skipped. The full RFC can be
 viewed here: https://wiki.php.net/rfc/compact

 By initializing these variables, they can be compacted.

 Previously [43819].
 See #44416.
 Props desrosj.
 }}}

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


More information about the wp-trac mailing list