From: Carsten K. <car...@us...> - 2003-11-14 19:06:34
|
Hi All, I'm forwarding this bug for discussion here on the list, I didn't see a copy of this thread here yet. A similar problem was fixed in the past about a year ago or so, but I can't find it in the ChangeLog yet. Does anyone remember this bug or how it was fixed? I'm betting the fix will be similar here. It had something to do with the compared content/value of a string vs. an integer: "0" == true vs. 0 != true Unfortunately that's all I remember. Thanks, Carsten Workaround: Yes those indented zeros seem to be what is uncovering this bug in the BlockParser. Change the 0s to Ohs and the problem is gone. Probably what you want anyway for this page is to enclose the ascii-art diagram in <pre></pre> or <verbatim></verbatim>, the problem also goes away that way. Begin forwarded message: > From: Bernd Porr <Ber...@cn...> > Date: Thu Nov 13, 2003 2:16:52 pm Canada/Eastern > To: Carsten Klapp <car...@us...> > Subject: Re: phpwiki > User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) > Gecko/20031008 > X-Accept-Language: en > > Hi Carsten, > > it works so far. The error in the error has disappeared. Still there's > the error on that page: > > http://www.cn.stir.ac.uk/teaching/phpwiki-1.3.5/index.php/ > The%20Experiment > > I've sent you the wiki src. I think it's the ASCII art which generates > the error. > > /Bernd > > Carsten Klapp wrote: > >> >> Try this one-line patch, it should fix the second error in >> Request.php that shows up right after the error in BlockParser.php >> ("Error while handling error"). >> >> Carsten >> >> RCS file: /cvsroot/phpwiki/phpwiki/lib/Request.php,v >> retrieving revision 1.35 >> diff -U2 -r1.35 Request.php >> --- Request.php 6 Nov 2003 19:39:55 -0000 1.35 >> +++ Request.php 13 Nov 2003 18:09:20 -0000 >> @@ -610,4 +610,5 @@ >> $time = time(); >> $offset = date("Z", $time); >> + $negoffset = ""; >> if ($offset < 0) { >> $negoffset = "-"; >> >> >> >> On Thursday, November 13, 2003, at 09:49 am, Bernd Porr wrote: >> >>> Hi! >>> >>> >>> >>> One of my students did a ASCII art in the wiki and crashed it. >>> >>> >>> >>> http://www.cn.stir.ac.uk/teaching/phpwiki-1.3.5/index.php/ >>> The%20Experiment >>> >>> >>> >>> I get an error message: >>> >>> >>> >>> lib/BlockParser.php:465: Fatal[0]: <br >>> >>> />/usr/local/httpd/html/teaching/phpwiki-1.3.5/lib/ >>> BlockParser.php:465: >>> >>> : Assertion failed <br /> >>> >>> >>> >>> I'll try to fix it but I would appreciate some hints. >>> >>> >>> >>> Thanks >>> >>> >>> >>> /Bernd >>> > > -- > Contact information: > http://www.cn.stir.ac.uk/~bp1/ > > > Date: Thu, 13 Nov 2003 12:54:36 +0000 > Mime-Version: 1.0 (Produced by PhpWiki 1.3.5pre) > Content-Type: application/x-phpwiki; > pagename=The%20Experiment; > flags=""; > author=cjc08; > version=8; > lastmodified=1068728076; > author_id=cjc08; > markup=2; > hits=23; > charset=iso-8859-1 > Content-Transfer-Encoding: binary > > In a separate room to the Playground, the Human Player was faced with > a computer screen with the following layout: > > 0 - - - - - - - 0 > > 0 - - - - - - - 0 > > 0 > > This is exactly eqivalent to the Bruce the Robot's desired state goal: > all sensors are silent (shown as 0). |
From: Bernd P. <Ber...@cn...> - 2003-11-14 22:14:50
Attachments:
patch.BlockParser.php
|
Hi! So. Next try. Actually I should have read the doco of php. I hava to initialise the variable "really_match" in a constructor... Otherwise it is always false. Or with some php versions the behaviour is undefined. /Bernd Carsten Klapp wrote: > > Hi All, > I'm forwarding this bug for discussion here on the list, I didn't see > a copy of this thread here yet. > > A similar problem was fixed in the past about a year ago or so, but I > can't find it in the ChangeLog yet. > > Does anyone remember this bug or how it was fixed? I'm betting the > fix will be similar here. > > It had something to do with the compared content/value of a string > vs. an integer: > > > "0" == true vs. 0 != true > > > Unfortunately that's all I remember. > > Thanks, > Carsten > > Workaround: > > Yes those indented zeros seem to be what is uncovering this bug in > the BlockParser. Change the 0s to Ohs and the problem is gone. > Probably what you want anyway for this page is to enclose the > ascii-art diagram in <pre></pre> or <verbatim></verbatim>, the > problem also goes away that way. > > > Begin forwarded message: > >> From: Bernd Porr <Ber...@cn...> >> Date: Thu Nov 13, 2003 2:16:52 pm Canada/Eastern >> To: Carsten Klapp <car...@us...> >> Subject: Re: phpwiki >> User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) >> Gecko/20031008 >> X-Accept-Language: en >> >> Hi Carsten, >> >> it works so far. The error in the error has disappeared. Still >> there's the error on that page: >> >> http://www.cn.stir.ac.uk/teaching/phpwiki-1.3.5/index.php/ >> The%20Experiment >> >> I've sent you the wiki src. I think it's the ASCII art which >> generates the error. >> >> /Bernd >> >> Carsten Klapp wrote: >> >>> >>> Try this one-line patch, it should fix the second error in >>> Request.php that shows up right after the error in BlockParser.php >>> ("Error while handling error"). >>> >>> Carsten >>> >>> RCS file: /cvsroot/phpwiki/phpwiki/lib/Request.php,v >>> retrieving revision 1.35 >>> diff -U2 -r1.35 Request.php >>> --- Request.php 6 Nov 2003 19:39:55 -0000 1.35 >>> +++ Request.php 13 Nov 2003 18:09:20 -0000 >>> @@ -610,4 +610,5 @@ >>> $time = time(); >>> $offset = date("Z", $time); >>> + $negoffset = ""; >>> if ($offset < 0) { >>> $negoffset = "-"; >>> >>> >>> >>> On Thursday, November 13, 2003, at 09:49 am, Bernd Porr wrote: >>> >>>> Hi! >>>> >>>> >>>> >>>> One of my students did a ASCII art in the wiki and crashed it. >>>> >>>> >>>> >>>> http://www.cn.stir.ac.uk/teaching/phpwiki-1.3.5/index.php/ >>>> The%20Experiment >>>> >>>> >>>> >>>> I get an error message: >>>> >>>> >>>> >>>> lib/BlockParser.php:465: Fatal[0]: <br >>>> >>>> />/usr/local/httpd/html/teaching/phpwiki-1.3.5/lib/ >>>> BlockParser.php:465: >>>> >>>> : Assertion failed <br /> >>>> >>>> >>>> >>>> I'll try to fix it but I would appreciate some hints. >>>> >>>> >>>> >>>> Thanks >>>> >>>> >>>> >>>> /Bernd >>>> >> >> -- >> Contact information: >> http://www.cn.stir.ac.uk/~bp1/ >> >> >> Date: Thu, 13 Nov 2003 12:54:36 +0000 >> Mime-Version: 1.0 (Produced by PhpWiki 1.3.5pre) >> Content-Type: application/x-phpwiki; >> pagename=The%20Experiment; >> flags=""; >> author=cjc08; >> version=8; >> lastmodified=1068728076; >> author_id=cjc08; >> markup=2; >> hits=23; >> charset=iso-8859-1 >> Content-Transfer-Encoding: binary >> >> In a separate room to the Playground, the Human Player was faced >> with a computer screen with the following layout: >> >> 0 - - - - - - - 0 >> >> 0 - - - - - - - 0 >> >> 0 >> >> This is exactly eqivalent to the Bruce the Robot's desired state >> goal: all sensors are silent (shown as 0). > > > > > ------------------------------------------------------- > This SF. Net email is sponsored by: GoToMyPC > GoToMyPC is the fast, easy and secure way to access your computer from > any Web browser or wireless device. Click here to Try it Free! > https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl > _______________________________________________ > Phpwiki-talk mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwiki-talk -- Contact information: http://www.cn.stir.ac.uk/~bp1/ |