Make WordPress Core


Ignore:
Timestamp:
12/14/2018 05:12:12 AM (6 years ago)
Author:
desrosj
Message:

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.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/tests/phpunit/tests/dependencies/scripts.php

    r44115 r44166  
    868868     */
    869869    public function test_wp_enqueue_code_editor_when_generated_array_by_compact_will_be_passed() {
     870        $file                   = '';
    870871        $wp_enqueue_code_editor = wp_enqueue_code_editor( compact( 'file' ) );
    871872        $this->assertNonEmptyMultidimensionalArray( $wp_enqueue_code_editor );
Note: See TracChangeset for help on using the changeset viewer.