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
Posted by Dolf Schimmel (Freeaqingme) (freak) on 2010-07-28T18:39:56.000+0000
By the way, please someone unittest this...
Posted by Frank Brückner (frosch) on 2013-01-18T08:08:47.000+0000
Patch and unit test added.
Posted by Frank Brückner (frosch) on 2013-02-13T17:38:15.000+0000
Fixed on trunk (25258) and release-1.12 (25259)