Fix new-reference behavior in diff renderer default tip
authorDan Fuhry <dan@enanocms.org>
Fri, 01 Apr 2016 10:28:01 -0400
changeset 1383 198f5207119b
parent 1382 78fbedb876f3
Fix new-reference behavior in diff renderer
includes/diffengine/Renderer.php
--- a/includes/diffengine/Renderer.php	Fri Apr 01 10:26:18 2016 -0400
+++ b/includes/diffengine/Renderer.php	Fri Apr 01 10:28:01 2016 -0400
@@ -30,7 +30,7 @@
 		/**
  		* Constructor.
  		*/
-		function Text_Diff_Renderer($params = array())
+		function __construct($params = array())
 		{
 				foreach ($params as $param => $value) {
 						$v = '_' . $param;
@@ -85,7 +85,7 @@
 										} else {
 												if ($ntrail) {
 														$context = array_slice($edit->orig, 0, $ntrail);
-														$block[] = &new Text_Diff_Op_copy($context);
+														$block[] = new Text_Diff_Op_copy($context);
 												}
 												$output .= $this->_block($x0, $ntrail + $xi - $x0,
  																								$y0, $ntrail + $yi - $y0,
@@ -101,7 +101,7 @@
 										$y0 = $yi - count($context);
 										$block = array();
 										if ($context) {
-												$block[] = &new Text_Diff_Op_copy($context);
+												$block[] = new Text_Diff_Op_copy($context);
 										}
 								}
 								$block[] = $edit;