[ phpwiki-Bugs-3496654 ] PHP Fata error cannot use object of type HtmlElement

SourceForge.net <[email protected]> Sat, 03 Mar 2012 14:31:17 -0800
Newsgroups gmane.comp.web.wiki.phpwiki.bugs
Message-ID <[email protected]>
Bugs item #3496654, was opened at 2012-03-03 14:31
Message generated for change (Tracker Item Submitted) made by philiph
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=106121&aid=3496654&group_id=6121

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: version 1.4.x (current)
Group: PHP error
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Philip J. Hollenback (philiph)
Assigned to: Nobody/Anonymous (nobody)
Summary: PHP Fata error cannot use object of type HtmlElement

Initial Comment:
Seeing a lot o these in my logs on www.hollenback.net:

[Fri Mar 02 22:38:31 2012] [error] [client 199.27.128.228] PHP Fatal error:  Cannot use object of type HtmlElement as array in /var/www/phpwiki/lib/CachedMarkup.php on line 559, referer: http://www.google.com/search?q=tag+on+tag+off+clipper+card&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a

code:

    function _expand($url, $label = false) {
        global $WikiTheme;
        $m = $this->_expandurl($url);
        $class = 'wiki';
        // do not link to the attribute value, but to the attribute
        $is_attribute = ($m[2] == ':='); // this is the line that fails
        if ($WikiTheme->DUMP_MODE and $WikiTheme->VALID_LINKS) {
            if (isset($this->_page) and !in_array($this->_page, $WikiTheme->VALID_LINKS))
                return HTML($label ? $label : ($is_attribute ? $this->_relation : $this->_page));
        }

please give me some advice on how to troubleshoot this.  I tried commenting out that line, but that then leads to:

[Sat Mar 03 14:23:05 2012] [error] [client 173.245.55.234] PHP Fatal error:  Cannot use object of type HtmlElement as array in /var/www/phpwiki/lib/CachedMarkup.php on line 591, referer: http://www.google.com/search?hl=en&client=safari&sa=X&ei=WJpST4alDojPgAfyrrkr&ved=0CBsQvwUoAQ&q=how+to+connect+directv+to+my+dd-+wrt+router&spell=1&biw=320&bih=416

in the line

         HTML::span(array('class'=>'relation-symbol'), $m[2]),

so it seems that $m[2] does not contain valid data when this happens.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=106121&aid=3496654&group_id=6121

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d