parse-community / parse-php-sdk

The PHP SDK for Parse Platform
https://parseplatform.org/
Other
811 stars 346 forks source link

Warning: Invalid argument supplied for foreach() in ParseObject class #384

Closed Ankit-Khachane closed 6 years ago

Ankit-Khachane commented 6 years ago

Issue Description

Php Parse api is not working properly, I am getting this error on saving data on my parse server app over back4app for following data

$object = ParseObject::create("TableTest");

$object->set("Animal", "elephent");
$object->set("today", new DateTime());
$object->setArray("mylist", [1, 2, 3]);

$object->save(); 

Environment Details

Logs/Traces

Warning: Invalid argument supplied for foreach() in C:\ ...\vendor\parse\phpsdk\src\Parse\ParseObject.php on line 631

montymxb commented 6 years ago

@Ankit-Khachane This looks like a response from the server may not be as expected, assuming the error is on line 631 as mentioned.

If you could provide the full exception stack trace that would be much more helpful to determine the exact path of execution that is causing this. Feel free to redact any sensitive data as needed.

We have test cases that account for this functionality, but they predominantly run on a linux box. Considering that it's possible that this may be windows related, not necessarily the case but an option to consider while investigating.

montymxb commented 6 years ago

Closing this out as you haven't followed up. If this is still an issue let us know so we can reopen and address it, and with details!