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


Zend_Gdata_App, line 728

    public static function import($uri, $client = null,
        $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) {
        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.


By the way, please someone unittest this...

Patch and unit test added.

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