php.net |  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: Progman2002 at gmx dot de
New email:
PHP Version: OS:

 

 [2003-09-28 11:55 UTC] 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-09-01 16:29 UTC] alan_k@php.net
can you report this on pear.php.net 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: Sat Dec 21 18:01:29 2024 UTC