6.0.0-beta1
7/7/25

[#13253] Bug found in Text_Diff Mapped class, incorrect call to parent constructor
Summary Bug found in Text_Diff Mapped class, incorrect call to parent constructor
Queue Horde Framework Packages
Queue Version Git master
Type Bug
State Resolved
Priority 2. Medium
Owners jan (at) horde (dot) org
Requester mrpaul (at) gmail (dot) com
Created 06/08/2014 (4047 days ago)
Due
Updated 06/10/2014 (4045 days ago)
Assigned
Resolved 06/10/2014 (4045 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
06/10/2014 11:47:48 AM Jan Schneider Assigned to Jan Schneider
State ⇒ Resolved
 
06/10/2014 11:47:36 AM Git Commit Comment #2 Reply to this comment
Changes have been made in Git (master):

commit f9a96dc30f279137aa3eeecb9dccf869fbe8e43c
Author: Jan Schneider <jan@horde.org>
Date:   Tue Jun 10 13:47:13 2014 +0200

     [jan] Fix signature of Horde_Text_Diff_Mapped constructor (BC 
break!) (Bug #13253).

  framework/Text_Diff/lib/Horde/Text/Diff/Mapped.php |   23 +++++++++----------
  framework/Text_Diff/package.xml                    |   17 +++++++-------
  2 files changed, 19 insertions(+), 21 deletions(-)

http://github.com/horde/horde/commit/f9a96dc30f279137aa3eeecb9dccf869fbe8e43c
06/08/2014 02:56:25 AM mrpaul (at) gmail (dot) com Comment #1
Priority ⇒ 2. Medium
Patch ⇒ No
Milestone ⇒
Queue ⇒ Horde Framework Packages
Summary ⇒ Bug found in Text_Diff Mapped class, incorrect call to parent constructor
Type ⇒ Bug
State ⇒ Unconfirmed
Reply to this comment
In the Horde\Text\Diff\Mapped.php constructor, the call to its parent 
constructor is wrong:

parent::__construct($mapped_from_lines, $mapped_to_lines);

This produces a Fatal error: Class 'Horde_Text_Diff_Engine_' not found 
since the parent constructor expects a string and an array.

The line should be changed to:

parent::__construct('auto', array($mapped_from_lines, $mapped_to_lines));

I checked the history of the file and this seems to have been a bug 
for a while.

Saved Queries