PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Text » Text_Wiki » Bug #5185

Problems with rules set in constructor

Details

Submitted2005-08-23 13:42 UTC
Frompear dot 20 dot fab at spamgourmet dot com
Assignedjustinpatrin
StatusBogus
PackageText_Wiki
PHP Version4.2.2
OSLinux
Roadmaps(Not assigned)

Comments

[2005-08-23 13:42 UTC] pear dot 20 dot fab at spamgourmet dot com

Description:
------------
When using Text_Wiki with a predefined list of rules, it will fail to include the necessary classes because of capitalization issues.

Notice: Undefined index: paragraph in /var/www/html/kehr02/ow2/inc/Text/Wiki.php on line 841

Test script:
---------------
$wiki =& new Text_Wiki(array('Prefilter','paragraph')); // does not work

$wiki =& new Text_Wiki(array('Prefilter','Paragraph')); // does work!

// perhaps the constructor should look like
function Text_Wiki($rules = null)
{
if (is_array($rules)) {
$this->rules = array();
foreach($rules as $rule) {
array_push($this->rules, ucwords(strtolower($rule)));
}
}
// [..]
}