ymkjp / opensocial-php-client

Automatically exported from code.google.com/p/opensocial-php-client
Apache License 2.0
0 stars 0 forks source link

osapiMediaItem incorrectly returns invalid mimetype #65

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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.

Original issue reported on code.google.com by lotu...@mail.be on 16 Nov 2009 at 3:54

GoogleCodeExporter commented 9 years ago
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.

Original comment by matusz...@gmail.com on 15 Feb 2010 at 10:59