WordPress.org

Make WordPress Core

Opened 2 years ago

Closed 2 years ago

#24974 closed defect (bug) (fixed)

Deprecated use of assignment by reference in testcase.php

Reported by: jdgrimes Owned by:
Milestone: 3.7 Priority: normal
Severity: normal Version:
Component: Unit Tests Keywords: has-patch
Focuses: Cc:

Description

As of PHP 5, the new operator returns a reference automatically, so assigning the result of new by reference results in an E_DEPRECATED message in PHP 5.3 and later, and an E_STRICT message in earlier versions.

(From the PHP docs)

There are two instances of this in /includes/testcase.php. Since WordPress requires at least PHP 5.2, I assume that the unit tests do also.

Attachments (1)

24974.patch (664 bytes) - added by jdgrimes 2 years ago.
Removes three unnecessary instances of assignment by reference, two of which are deprecated.

Download all attachments as: .zip

Change History (2)

@jdgrimes2 years ago

Removes three unnecessary instances of assignment by reference, two of which are deprecated.

comment:1 @duck_2 years ago

  • Milestone changed from Awaiting Review to 3.7
  • Resolution set to fixed
  • Status changed from new to closed

Thanks for the patch. However, fixed independently by dd32 in [25017].

Note: See TracTickets for help on using tickets.