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.
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.
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