Home » Text » Text_Wiki » Bug #5185
Problems with rules set in constructor
Details
| Submitted | 2005-08-23 13:42 UTC |
|---|---|
| From | pear dot 20 dot fab at spamgourmet dot com |
| Assigned | justinpatrin |
| Status | Bogus |
| Package | Text_Wiki |
| PHP Version | 4.2.2 |
| OS | Linux |
| 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)));
}
}
// [..]
}