Menu

DIFF broken in 1.17

2000-09-15
2012-10-11
  • Mark L. Chang

    Mark L. Chang - 2000-09-15

    I get the following error on some of my more-accessed pages:

    Fatal error: Unsupported operand types in wiki_diff.php3 on line 869

    I have not modified that file in any way, and I even took a look at the 'ol NursesPortal and the same problem occurs.

    Configuration is Solaris 8 on SPARC, PHP v4.0.1pl2, Apache 1.3.12, and mysql  Ver 9.38 Distrib 3.22.32.

    Thoughts? I'm submitting as a bug as well, in case this posting is missed.

     
    • Steve Wainstead

      Steve Wainstead - 2000-09-16

      Yeah, I introduced this bug myself :-)

      I have been working 12-16 hour days for a couple of weeks and haven't had time to tackle it. But today I was mailed a fix. Hopefully it solves the problem entirely, but I think it needs closer examination:

      Date: Fri, 15 Sep 2000 23:31:35 +0800
      From: jlim@natsoft.com.my
      To: swain@panix.com
      Subject: PHP Wiki working on Windows 98 -- diff bug

      Hello,

      I am using PHP Wiki on Win98, PHP4, running personal web server (PWS).

      There is a problem with diff in this config. In the following function in
      wiki_diff.php3, I had to add a check for !is_array($edit), otherwise $ncopy
      would set itself to the array $edit.

      function _format ($edits, $from_lines)
            {
              $x = 0; $y = 0;
              $xlim = sizeof($from_lines);

              reset($edits);
              while ($edit = current($edits))
                {
                  if ($edit > 0 && !is_array($edit))    // MOD HERE - jlim
                    { // Edit op is a copy.
                      $ncopy = $edit;
                    }

      Thanks for the nice port.

      Regards, John

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.