您好,

在使用LeanObject->save()時,出現了以下錯誤。

PHP Fatal error: Call to undefined function LeanCloud\save() in
leancloud/leancloud-sdk/src/LeanCloud/LeanObject.php on line 586

代碼
$query = new \LeanQuery("Post");
$post = $query->get("567a713c60b2e1871deb2eee");
$post->set("file", \LeanFile::createWithLocalFile($output_file));
$post->set("cropType", "");
$post->save();

SDK版本:
leancloud/leancloud-sdk v0.2.1

查看了代碼,應該是以下問題,請代為修複

leancloud/leancloud-sdk/src/LeanCloud/LeanObject.php line 586

forEach($unsavedChildren as $obj) {
if ($obj instanceof LeanFile) {
$obj.save(); // <- 應是$obj->save()
} else if ($obj instanceof LeanObject) {
if (!in_array($obj, $children)) {
$children[] = $obj;
}
}
}

你好,修复版本已发布 0.2.21 。请注意升级 sdk 。非常感谢你提交问题及修复。