|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25680 BB-Parser produce a notice for invalid bb-code
Submitted: 2003-09-28 11:55 UTC Modified: 2004-09-01 16:29 UTC
From: Progman2002 at gmx dot de Assigned:
Status: Not a bug Package: PEAR related
PHP Version: Irrelevant OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: Progman2002 at gmx dot de
New email:
PHP Version: OS:


 [2003-09-28 11:55 UTC] Progman2002 at gmx dot de
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:

Reproduce code:
    require_once 'HTML/BBCodeParser.php';

    echo HTML_BBCodeParser::staticQParse('foo[]bar');

Expected result:

Actual result:
Notice: Undefined offset: 1 in /usr/lib/php/HTML/BBCodeParser.php on line 386


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-09-01 16:29 UTC]
can you report this on if the problem still exists - where the package maintainers now manage pear bugs
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Dec 01 13:01:26 2023 UTC