#25680 [Opn->Bgs]: BB-Parser produce a notice for invalid bb-code
| From: | alan_k@php.net | Date: | Wed, 01 Sep 2004 14:29:59 +0000 |
| Subject: | #25680 [Opn->Bgs]: BB-Parser produce a notice for invalid bb-code | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-33160@lists.php.net to get a copy of this message | ||
ID: 25680
Updated by: alan_k@php.net
Reported By: Progman2002 at gmx dot de
-Status: Open
+Status: Bogus
Bug Type: PEAR related
Operating System: linux
PHP Version: Irrelevant
New Comment:
can you report this on pear.php.net if the problem still exists - where
the package maintainers now manage pear bugs
Previous Comments:
------------------------------------------------------------------------
[2003-09-28 11:55:18] Progman2002 at gmx dot de
Description:
------------
If you use an empty bb-code "[]" or any other invalid BB-Code which
doesn't match [a-z]+, php produce the following Notice:
Notice: Undefined offset: 1 in /usr/lib/php/HTML/BBCodeParser.php on
line 386
I have written a patch to fix this:
http://progman.it-pc.de/diff/BBCodeParser.diff
Reproduce code:
---------------
<?php
error_reporting(E_ALL);
require_once 'HTML/BBCodeParser.php';
echo HTML_BBCodeParser::staticQParse('foo[]bar');
?>
Expected result:
----------------
foo[]bar
Actual result:
--------------
Notice: Undefined offset: 1 in /usr/lib/php/HTML/BBCodeParser.php on
line 386
foo[]bar
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=25680&edit=1