Skip to content

Commit

Permalink
Use setACL prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
juvenn committed Nov 16, 2016
1 parent d556437 commit 997d72f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/LeanCloud/Object.php
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,10 @@ private function _set($key, $val) {
* @throws RuntimeException
*/
public function set($key, $val) {
if ($key === "ACL") {
throw new \RuntimeException("`ACL` is preserved,".
" please use setACL instead.");
}
if (in_array($key, self::PRESERVED_KEYS)) {
throw new \RuntimeException("Preserved field could not be set.");
}
Expand Down

0 comments on commit 997d72f

Please sign in to comment.