WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/24/2018 04:32:29 PM (2 years ago)
Author:
jorbin
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

This fixes all unit tested code that uses compact.

Props desrosj.
Fixes #44416.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0/src/wp-includes/comment.php

    r43729 r43819  
    29662966function wp_handle_comment_submission( $comment_data ) {
    29672967
    2968     $comment_post_ID = $comment_parent = 0;
     2968    $comment_post_ID = $comment_parent = $user_ID = 0;
    29692969    $comment_author = $comment_author_email = $comment_author_url = $comment_content = null;
    29702970
Note: See TracChangeset for help on using the changeset viewer.