#25680 [NEW]: BB-Parser produce a notice for invalid bb-code
| From: | Progman2002 at gmx dot de | Date: | Sun, 28 Sep 2003 15:55:18 +0000 |
| Subject: | #25680 [NEW]: BB-Parser produce a notice for invalid bb-code | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-22127@lists.php.net to get a copy of this message | ||
From: Progman2002 at gmx dot de
Operating system: linux
PHP version: Irrelevant
PHP Bug Type: PEAR related
Bug description: BB-Parser produce a notice for invalid bb-code
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 bug report at http://bugs.php.net/?id=25680&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25680&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25680&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=25680&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=25680&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=25680&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=25680&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=25680&r=support
Expected behavior: http://bugs.php.net/fix.php?id=25680&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=25680&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=25680&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=25680&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25680&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=25680&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=25680&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=25680&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=25680&r=float