php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59879 Usage of param_handling causes crash
Submitted: 2011-08-01 19:51 UTC Modified: 2017-04-01 19:34 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: YKH06 at aol dot com Assigned:
Status: Wont fix Package: bbcode (PECL)
PHP Version: 5.3.6 OS: Ubuntu 11.04
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: YKH06 at aol dot com
New email:
PHP Version: OS:

 

 [2011-08-01 19:51 UTC] YKH06 at aol dot com
Description:
------------
When trying to use param_handling to call a simple function to check a link, it crashes and the Apache-log says, that a segmentation fault occured. It only happens in 1.0.3b1, in 1.0.2 it's fine.

Reproduce code:
---------------
function checkLink($content, $argument) {
  if(substr($content, 0, 7)) != 'http://') return 'http://'.$content;
  else return $content;
}
$pd['url']['type'] = BBCODE_TYPE_OPTARG;
$pd['url']['open_tag'] = '<a href="{PARAM}">';
$pd['url']['close_tag'] = '</a>';
$pd['url']['default_arg'] = '{CONTENT}';
$pd['url']['param_handling'] = 'checkLink';
$parser = bbcode_create($pd);
echo bbcode_parse($parser, '[url]php.net[/url]');

Expected result:
----------------
<a href="http://php.net">php.net</a>

Actual result:
--------------
crash

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-04-01 19:34 UTC] tpunt@php.net
-Status: Open +Status: Wont fix
 [2017-04-01 19:34 UTC] tpunt@php.net
Due to this extension not seeing any activity since 2010, this issue will not be fixed. We are therefore closing this now.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Fri May 09 12:01:28 2025 UTC