|  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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
13 + 3 = ?
Subscribe to this entry?

 [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-2024 The PHP Group
All rights reserved.
Last updated: Wed Feb 28 14:01:28 2024 UTC