ZF-10243: Zend_Gdata_App, using $this when not in object context

Description

Zend_Gdata_App, line 728


    public static function import($uri, $client = null,
        $className='Zend_Gdata_App_Feed')
    {
        $app = new Zend_Gdata_App($client);
        $requestData = $app->prepareRequest('GET', $uri);
        $response = $app->performHttpRequest(
            $requestData['method'], $requestData['url']);

        $feedContent = $response->getBody();
        if (!$this->_useObjectMapping) {
            return $feedContent;
        }
        $feed = self::importString($feedContent, $className);
        if ($client != null) {
            $feed->setHttpClient($client);
        }
        return $feed;
    }

This static function has $this inside.

Actually it's my IDE which highlighted the file as containing errors and I don't know when exactly this function is called and if it's really needed, but it just looks so wrong.

Perhaps it works with 5.2 php version, with > 5.3 such a function will cause fatal error.

Comments

By the way, please someone unittest this...

Patch and unit test added.

Fixed on trunk (25258) and release-1.12 (25259)