9
在我Restler API類我已經定義了以下這樣一個對象(與許多其他則params的)Restler不接受布爾值false
class PatchTaskObj extends TaskObj {
/**
* @var bool|null Whether or not this Task should be pinned to the top of the list {@required false}
*/
public $pinned = null;
}
然後我試圖在我的PATCH方法來使用它:
/**
* Updates an existing Task record.
*
* @param int $id The SQL ident of the task you wish to update. {@min 1} {@from path}
* @param PatchTaskObj $info The properties of the Task to update.
*
* @throws RestException 412 Thrown if at least one update isn't passed in.
*
* @status 204
*/
function patch($id, PatchTaskObj $info)
如果我在true
通爲pinned
財產它工作正常,但如果我通過false
然後我從Restler 400與消息:
請求無效:爲
info[pinned]