Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#24974 closed defect (bug) (fixed)

Deprecated use of assignment by reference in testcase.php

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

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 13 years ago.
Removes three unnecessary instances of assignment by reference, two of which are deprecated.

Download all attachments as: .zip

Change History (2)

@jdgrimes
13 years ago

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

#1 @duck_
13 years ago

  • Milestone Awaiting Review → 3.7
  • Resolution → fixed
  • Status new → closed

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

Note: See TracTickets for help on using tickets.