Export to GitHub

opensocial-php-client - issue #65

osapiMediaItem incorrectly returns invalid mimetype


Posted on Nov 16, 2009 by Swift Camel

What steps will reproduce the problem? 1. osapiMediaItem returns an error when using a correct mimetype 2. The mimetype is image/jpeg 3. osapiMediaItem throws an exception of invalid media type (only image is allowed)

What is the expected output? What do you see instead? No exception as image/jpeg is a valid mimetype

What version of the product are you using? On what operating system? 1.1.1

Please provide any additional information below.

Comment #1

Posted on Feb 15, 2010 by Swift Rabbit

Hi there, OpenSocial defines two info about media type: type (IMAGE, AUDIO, VIDEO) and mimeType. To fix this I believe we should check type variable instead of mimeType. Line: 46 - osapiMediaItem.php -- if(strtolower($key) == 'mimetype') { ++ if(strtolower($key) == 'type') {

All works for me then.

Status: New

Labels:
Type-Defect Priority-Medium