Skip to content

Commit

Permalink
Throw exception when update find an error
Browse files Browse the repository at this point in the history
  • Loading branch information
tafid committed Jul 30, 2015
1 parent 68ea22c commit 84ba01e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ActiveRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -325,9 +325,9 @@ protected function updateInternal($attributes = null, $options = [])
$this->afterSave(false, $changedAttributes);

if ($result === false || Err::isError($result)) {
return 0;
throw new HiResException('Hiresource method: update', Err::getError($result));
} else {
return 1;
return $result;
}
}

Expand Down

0 comments on commit 84ba01e

Please sign in to comment.