ZF-3124: Calling a non-static function from a static context in Zend_Feed

Issue Type: Bug Created: 2008-04-17T06:49:07.000+0000 Last Updated: 2008-11-13T14:10:13.000+0000 Status: Resolved Fix version(s): - 1.7.0 (17/Nov/08)

Reporter: Alucard (alucard) Assignee: Alexander Veremyev (alexander) Tags: - Zend_Feed

Related issues: - ZF-3533



This bug is very easy to fix and should take only a few secs. But I don't know how to create a patch. Zend_Feed.php attempts to call DOMDocument load XML method without first instantiating a new instance.

Feed.php[195] E_STRICT: Non-static method DOMDocument::loadXML() should not be called statically

The fix:

<pre class="highlight">
     * @throws Zend_Feed_Exception
     * @return Zend_Feed_Abstract
    public static function importString($string)
        // Load the feed as an XML DOMDocument object
        @ini_set('track_errors', 1);
{color:red}     $doc = new DOMDocument();{color}

Abstract.php[113] E_STRICT: Non-static method DOMDocument::loadXML() should not be called statically, assuming $this from incompatible context The fix:

<pre class="highlight">
    public function __wakeup()
        @ini_set('track_errors', 1);
{color:red}     $doc = new DOMDocument();{color}


Posted by Wil Sinclair (wil) on 2008-04-18T13:25:24.000+0000

Please evaluate and categorize as necessary.

Posted by Benjamin Eberlei (beberlei) on 2008-11-07T05:28:48.000+0000

Was fixed by matthew in r10380.

Posted by Wil Sinclair (wil) on 2008-11-13T14:10:13.000+0000

Changing issues in preparation for the 1.7.0 release.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.