Skip to content

Commit

Permalink
avoid null error
Browse files Browse the repository at this point in the history
  • Loading branch information
lekoala committed Sep 19, 2024
1 parent 43f66e3 commit a435671
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/EncryptedDBJson.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ public function toArray()
*/
public function pretty()
{
if (!$this->value) {
return '';
}
$decoded = json_decode($this->value);
if (!$decoded) {
return json_last_error_msg();
Expand Down

0 comments on commit a435671

Please sign in to comment.