Home » Text » Text_Diff » Bug #6699
Text_Diff::reverse() wrong arument for clone
Details
| Submitted | 2006-02-05 22:48 UTC |
|---|---|
| From | php at scarfhogg dot de |
| Assigned | yunosh |
| Status | Closed |
| Package | Text_Diff |
| PHP Version | 5.1.2 |
| Roadmaps | (Not assigned) |
Comments
[2006-02-05 22:48 UTC] php at scarfhogg dot de
Description:
------------
Text_Diff::reverse() uses $obj instead of this when trying to clone the object when version_compare(zend_version(), '2', '>') evaluates to true
Test script:
---------------
$diff = new Text_Diff($lines1, $lines2);
$diff->reverse();
Expected result:
----------------
get reversed diff
Actual result:
--------------
Warning: __clone method called on non-object in ... Diff.php on line 77
Fatal error: Call to undefined method stdClass::getDiff() in ... Diff/Renderer.php on line 78
line 77 of Diff.php should be
$rev = clone $this;