Skip to content

Commit

Permalink
nullcheck from user_config might be handy
Browse files Browse the repository at this point in the history
  • Loading branch information
Mjokfox committed Dec 31, 2024
1 parent 8473eab commit d7b44f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ public function get_avatar_post_link() : ?string {
global $database;
$user_config = new DatabaseConfig($database, "user_config", "user_id", (string)$this->id);
$id = $user_config->get_int("avatar_post_id");
if ($id === 0) {
if (is_null($id) || $id === 0) {
return null;
}
$image = Image::by_id($id);
Expand Down

0 comments on commit d7b44f4

Please sign in to comment.