#11593 closed defect (bug) (wontfix)
Package Text_Diff contains &new
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Warnings/Notices | Version: | |
| Severity: | normal | Keywords: | |
| 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)
Change History (7)
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.
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.
- Component changed from General to Warnings/Notices
- Keywords has-patch added
- Milestone changed from 3.0 to Future Release
- Owner set to westi
- 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.
- 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

text_diff package