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

WordPress Trac noreply at wordpress.org
Fri Dec 14 05:12:16 UTC 2018


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

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 In [changeset:"44166" 44166]:
 {{{
 #!CommitTicketReference repository="" revision="44166"
 PHP7.3 compatibility: Fix compact throwing notices.

 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.

 Props jorbin, desrosj.

 Merges [43819] and [43832] to trunk.

 Fixes #44416.
 }}}

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


More information about the wp-trac mailing list