Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.2.3

Bug #10114 Ruleset Case Sensitivity
Submitted: 2007-02-16 22:36 UTC
From: dev at edoceo dot com Assigned: justinpatrin
Status: Closed Package: Text_Wiki (version 1.1.0)
PHP Version: 5.1.6 OS: Gentoo Linux
Roadmaps: 1.2.0    
Subscription  
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes. If this is not your bug, you can add a comment by following this link. If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
2007-06-09 23:17 UTC
Package:
Bug Type:
Summary:
From: dev at edoceo dot com
New email:
PHP Version: Package Version: OS:

 

 [2007-02-16 22:36 UTC] dev at edoceo dot com (David Busby)
Description: ------------ The rule names in the documentation show usage in lower case but then when the code is running it's referenced in Upper case. Like this: $rules = array('anchor','emphasis','heading','list','newline','paragraph','table','toc','tt','url'); $wiki = new Text_Wiki($rules); Well in Wiki->parse around like 930ish is this snip if (is_object($this->parseObj[$name])) And if one looks into the parseObj array you'll find all the names with Uppercase First Letters so when looking for rule 'anchor' it don't find 'Anchor' Test script: --------------- $rules = array('anchor','heading','list','newline','paragraph','table','toc','url'); $wiki = new Text_Wiki($rules); $xhtml = $wiki->transform($note->data,'Xhtml'); echo "
$xhtml
"; Expected result: ---------------- Expected to render with no issue. Actual result: -------------- Error: #8 - Undefined index: anchor File: /usr/share/php/Text/Wiki.php [931] I addeed $name = ucfirst($name) at line 922 as a quick fix.

Comments

 [2007-06-09 23:17 UTC] justinpatrin (Justin Patrin)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.