SimultaneousEdits-Talk

Summary: Talk page for SimultaneousEdits.
Maintainer: Petko (Original author: Pm)
Users: (View? / Edit)

This space is for User-contributed commentary and notes. Please include your name and a date along with your comment.

caution: phppmerge does not show a conflicting change when a whole paragraph is removed.

jjs 2006-12-01

Assigning the return value of new by reference

I believe this is not working with php 5.3.14 anymore...

I get the following messages:

Deprecated: Assigning the return value of new by reference is deprecated in /home2/codexwik/public_html/cookbook/phpsimuledit.php on line 103, on line 357, on line 379, on line 401, on line 423, on line 457, on line 459, on line 493, on line 508, on line 671, on line 793, on line 808, on line 810, on line 812.

I tried to play a bit with the code, to upgrade to a more recent text_diff engine, but there are a number of other errors. Fixing this will require more work, so it is now added to PITS:01292. --Petko July 16, 2012, at 05:02 AM

Should work as of 20160215, please report if any problems. --Petko February 15, 2016, at 04:37 PM

PHP 7 deprecation warnings

I am running pmwiki on IIS 8.5 with PHP 7.0.9 and I am getting deprecation warnings in my PHP log from phpmerge.php about classes with constructors that are the same name as the class. Here is a patch for phpmerge.php that seems to fix it, but I know almost nothing about PHP so I may have done something stupid... Asa Packer apacker [snail] biosonicsinc [period] com October 5, 2016, at 11:45 AM UTC-07:00

 --- phpmerge.php	Tue Oct  4 16:20:42 2016
 +++ phpmerge-new.php	Wed Oct  5 10:55:17 2016
  -369 +369  class Text_MappedDiff extends Text_Diff {
 -    function Text_MappedDiff($from_lines, $to_lines,
 +    function __construct($from_lines, $to_lines,
  -375 +375  class Text_MappedDiff extends Text_Diff {
 -        parent::Text_Diff($mapped_from_lines, $mapped_to_lines);
 +        parent::__construct($mapped_from_lines, $mapped_to_lines);
  -431 +431  class Text_Diff_Op_copy extends Text_Diff_Op {
 -    function Text_Diff_Op_copy($orig, $final = false)
 +    function __construct($orig, $final = false)
  -456 +456  class Text_Diff_Op_delete extends Text_Diff_Op {
 -    function Text_Diff_Op_delete($lines)
 +    function __construct($lines)
  -478 +478  class Text_Diff_Op_add extends Text_Diff_Op {
 -    function Text_Diff_Op_add($lines)
 +    function __construct($lines)
  -500 +500  class Text_Diff_Op_change extends Text_Diff_Op {
 -    function Text_Diff_Op_change($orig, $final)
 +    function __construct($orig, $final)
  -662 +662  class Text_Diff3_Op {
 -    function Text_Diff3_Op($orig = false, $final1 = false, $final2 = false)
 +    function __construct($orig = false, $final1 = false, $final2 = false)
  -701 +701  class Text_Diff3_Op_copy extends Text_Diff3_Op {
 -    function Text_Diff3_Op_Copy($lines = false)
 +    function __construct($lines = false)
  -728 +728  class Text_Diff3_BlockBuilder {
 -    function Text_Diff3_BlockBuilder()
 +    function __construct()

Thanks, Done. --Petko

Talk page for the SimultaneousEdits recipe (users?).