Skip to content

Commit

Permalink
Fixed payload error when model property is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Rivers committed Aug 8, 2017
1 parent 7517070 commit 9e9d3d1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Encryptable.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ public function encryptable($key)
*/
protected function decryptAttribute($value)
{
$value = decrypt($value);
if ($value) {
$value = decrypt($value);
}

return $value;
}
Expand All @@ -55,7 +57,9 @@ protected function decryptAttribute($value)
*/
protected function encryptAttribute($value)
{
$value = encrypt($value);
if ($value) {
$value = encrypt($value);
}

return $value;
}
Expand Down

0 comments on commit 9e9d3d1

Please sign in to comment.