ZF2-145: Zend\GData\Youtube throws an Exception

Issue Type: Bug Created: 2012-01-23T16:50:37.000+0000 Last Updated: 2012-03-02T20:13:41.000+0000 Status: Resolved Fix version(s): Reporter: Pierre-Louis LAUNAY (laupifrpar) Assignee: Maks 3w (maks3w) Tags: - Zend\Gdata

Related issues: Attachments:



When I want get a VideoEntry of YouTube:

$youtube = new \Zend\GData\YouTube(); $videoEntry = $youtube->getVideoEntry('6GXdJh8nNyk');

An Exception is thrown:

500 Internal Server Error - InvalidArgumentException A field name was provided without a field value In the file Zend/Http/Headers.php


Posted by Adam Lundrigan (adamlundrigan) on 2012-02-23T15:24:56.000+0000

Could you please provide the stack trace?

Posted by Samir El Aouar (dagon) on 2012-02-28T16:29:05.000+0000


I got same problem with \Zend\GData\Docs();

$docs = new \Zend\GData\Docs($client); $feed = $docs->getDocumentListFeed();

The error is thrown because the default value for $contentType argument in Zend\GData\App::performHttpRequest (line 581) is null, and generates a key-value pair "Content-Type" => null (line 611) for Zend\Http\Header::addHeaderLine method (line 219).

Fatal error: Uncaught exception 'Zend\Http\Exception\InvalidArgumentException' with message 'A field name was provided without a field value' in /home/usuarios/samir/public_html/zf2/library/Zend/Http/Headers.php:219 Stack trace:

0 /home/usuarios/samir/public_html/zf2/library/Zend/Http/Headers.php(190): Zend\Http\Headers->addHeaderLine('Content-Type', NULL)

1 /home/usuarios/samir/public_html/zf2/library/Zend/Http/Client.php(537): Zend\Http\Headers->addHeaders(Array)

2 /home/usuarios/samir/public_html/zf2/library/Zend/GData/App.php(632): Zend\Http\Client->setHeaders(Array)

3 /home/usuarios/samir/public_html/zf2/library/Zend/GData/GData.php(219): Zend\GData\App->performHttpRequest('GET', '', Array, NULL, NULL, NULL)

4 /home/usuarios/samir/public_html/zf2/library/Zend/GData/App.php(861): Zend\GData\GData->performHttpRequest('GET', '', Array)

5 /home/usuarios/samir/public_html/zf2/library/Zend/GData/App.php(752): Zend\GData\App->get('', NULL)

6 /home/usuarios/samir/p in /home/usuarios/samir/public_html/zf2/library/Zend/Http/Headers.php on line 219

Posted by Maks 3w (maks3w) on 2012-03-01T22:42:07.000+0000

This should be fixed with pull request #871

Posted by Maks 3w (maks3w) on 2012-03-02T20:13:41.000+0000

Fixed in beta3

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.