|  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
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
Have you experienced this issue?
Rate the importance of this bug to you:

 [2011-08-01 19:51 UTC] YKH06 at aol dot com
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][/url]');

Expected result:
<a href=""></a>

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-04-01 19:34 UTC]
-Status: Open +Status: Wont fix
 [2017-04-01 19:34 UTC]
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-2021 The PHP Group
All rights reserved.
Last updated: Wed Oct 27 20:03:34 2021 UTC