From: Todd M. <tm...@ne...> - 2003-02-26 09:00:00
|
As a quick fix, the following patch seems to work for me. The only problem would be that the is_a() function requires php >= 4.2.0. The method_exists function should work with all PHP4 versions, but is an uglier way to check. The patch might get wrapped by my mailer, but should be easy patch by hand. Index: BlockParser.php =================================================================== --- BlockParser.php (revision 52) +++ BlockParser.php (working copy) @@ -418,7 +418,7 @@ // If content is a single paragraph, eliminate the paragraph... if (count($this->_content) == 1) { $elem = $this->_content[0]; - if ($elem->getTag() == 'p') { + if (is_a($elem, 'XmlElement') && $elem->getTag() == 'p') { assert($elem->getAttr('class') == 'tightenable top bottom'); $this->setContent($elem->getContent()); } On Wed, 2003-02-26 at 03:25, Todd Mokros wrote: > With current cvs, if you have a plugin as part of a list, TightSubBlock > errors out with: "PHP Fatal error: Call to undefined function: > gettag() in lib/BlockParser.php on line 421" > > The problem is that $elem in that line of code is an instance of > Cached_PluginInvocation, which does not inherit from XmlElement. I'm > not sure if plugins shouldn't be allowed in lists and this error caught, > or other changes are needed to allow this. -- Todd Mokros <tm...@ne...> |