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

Description

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:


     * @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}
        @$doc->loadXML($string);
        @ini_restore('track_errors');

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


    public function __wakeup()
    {
        @ini_set('track_errors', 1);
{color:red}     $doc = new DOMDocument();{color}
        @$doc->loadXML($this->_element);
        @ini_restore('track_errors');

Comments

Please evaluate and categorize as necessary.

Was fixed by matthew in r10380.

Changing issues in preparation for the 1.7.0 release.