asimkumar2222 / opensocial-php-client

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

Fatal error iin osapi/io/osapiRestIO.php on line 82 #64

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

Not sure.

What is the expected output? What do you see instead?

The sendBatch() method causes fatal error in php5. Errors in Apache logs:

PHP Fatal error:  Cannot unset string offsets in osapi/io/osapiRestIO.php
on line 82

Line 82 is: "unset($entry['data']['entry']);"

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

v1.1.1 on PHP 5.2.4-2ubuntu5.7

Please provide any additional information below.

I have attached a patch.

Original issue reported on code.google.com by sma...@gmail.com on 14 Nov 2009 at 4:31

Attachments:

GoogleCodeExporter commented 9 years ago
this is because $entrydata is a string not an array (see
http://bugs.php.net/bug.php?id=31303 for reference). For now I have wrapped the 
unset
call in an is_array if condition to prevent fatal errors. 

Original comment by sma...@gmail.com on 14 Nov 2009 at 4:33