WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#11593 closed defect (bug) (wontfix)

Package Text_Diff contains &new

Reported by: hakre Owned by: westi
Milestone: Priority: normal
Severity: normal Version:
Component: Warnings/Notices Keywords:
Focuses: Cc:

Description

The Text_Diff Package from the Horde Package still contains &new fragments in it's code (multiple files). These should be replaced with just new.

Additionally (and related), the include file wp-includes/l10n.php does contain one such fragment as well.

Attachments (2)

11593-text_diff.patch (8.1 KB) - added by hakre 4 years ago.
text_diff package
11593-l10n.patch (426 bytes) - added by hakre 4 years ago.
l10n

Download all attachments as: .zip

Change History (7)

hakre4 years ago

text_diff package

hakre4 years ago

l10n

comment:1 follow-up: hakre4 years ago

Two patches added which reflect the according changes. More or less these are code improvements.

For improvements, I did a version compare of Text_Diff as well:

$Horde: framework/Text_Diff/Diff.php,v 1.26 2008/01/04 10:07:49 jan Exp $ (Version in WordPress)
$Horde: framework/Text_Diff/Diff.php,v 1.11.2.12 2009/01/06 15:23:41 jan Exp $ (Current Stable Version)

The stable version above in Pear is 1.1.1. The Pear Version I could identify as the WordPress Version is 1.0.0. It might be considerable to upgarde, but that would be a new ticket.

comment:2 westi4 years ago

I believe all of the instances of &new we have in WordPress as for PHP4 backwards compatibility reasons.

From: http://www.php.net/manual/en/language.references.whatdo.php

... The same syntax can be used with functions that return references, and with the new operator (since PHP 4.0.4 and before PHP 5.0.0) ... Since PHP 5, new returns a reference automatically, so using =& in this context is deprecated and produces an E_STRICT message.

comment:3 scribu4 years ago

  • Component changed from General to Warnings/Notices
  • Keywords has-patch added
  • Milestone changed from 3.0 to Future Release
  • Owner set to westi

comment:4 nacin4 years ago

  • Keywords has-patch removed
  • Milestone Future Release deleted
  • Resolution set to wontfix
  • Status changed from new to closed

When WordPress requires PHP 5, one of the first things to go will surely be =&. No use leaving this in future release in the meantime though.

We suppressed E_DEPRECATED AND E_STRICT warnings for WP_DEBUG in 2.9, so you should never see these.

comment:5 in reply to: ↑ 1 hakre4 years ago

  • Version 2.9 deleted

My fault, I did this report in error, was looking for assignments to global vars in local function space which do not work with pointers but that's acutally an array and should therefore be no problem.

For the text_diff package I'll open a new ticket to upgrade to the current version: #11648

Note: See TracTickets for help on using tickets.