I am getting this error when attempting to edit a video entry's metadata: Fatal error: Call to a member function getDOM() on a non-object in C:\workspace\domain\library\Zend\Gdata\App\FeedEntryParent.php on line 226
I am connecting using an authenticated login, and the edit link is obtained. Here is a simplified version of my update code: $authenticationURL= 'https://www.google.com/youtube/accounts/ClientLogin'; $httpClient = Zend_Gdata_ClientLogin::getHttpClient( $username = '[email protected]', $password = 'myPassword', $service = 'youtube', $client = null, $source = 'myApplication', // a short string identifying your application $loginToken = null, $loginCaptcha = null, $authenticationURL); $youtube = new Zend_Gdata_YouTube($httpClient, 'myDomain', 'myApplication', $config->youtube->developerKey); $youtube->setMajorProtocolVersion(2); $videoEntry = $youtube->getVideoEntry($this->getRequest()->getParam('videoID'), null, true); if($videoEntry->getEditLink() === null) { die ('Video has no edit link.'); } $videoEntry->setTitle('Hardcoded title update'); try{ $youtube->updateEntry($videoEntry, $videoEntry->getEditLink()->getHref()); $this->view->addMessage('ok', 'Video data edited ok.'); }catch(Zend_Gdata_App_Exception $e){ $this->view->addMessage('error', $e->getMessage()); } ...and the above fatal error occurs. Looking through the code in the framework that the error is pointing to is this snippet: (Zend\Gdata\App\FeedEntryParent.php, line 226) if ($this->_title != null) { $element->appendChild($this->_title->getDOM($element->ownerDocument)); } ...where the contents of $this->_title is 'Hardcoded title update' (from the above code). The point is it is a string and not an object, hence the fatal error. I have followed the example from the http://code.google.com/apis/youtube/2.0/developers_guide_php.html#Updating_Video_Information google developers guide , so am unsure what i'm doing wrong. -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/Fatal-error-getDom-on-a-non-object-zend-gdata-youtube-component-tp3392099p3392099.html Sent from the Zend Framework mailing list archive at Nabble.com. -- List: [email protected] Info: http://framework.zend.com/archives Unsubscribe: [email protected]
