feat: have sql_get_actor return null when no actor is found
This commit is contained in:
parent
c6f9f74be3
commit
9e7c18afba
|
@ -19,5 +19,8 @@ function sql_fetch_actor($conn, string $preferred_username) {
|
||||||
array(':object_id' => $object_id)
|
array(':object_id' => $object_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
return $result->fetchArray(SQLITE3_ASSOC);
|
// fetchArray returns false when there's no array; we're rather have it be
|
||||||
|
// explicitly null
|
||||||
|
$actor = $result->fetchArray(SQLITE3_ASSOC);
|
||||||
|
return $actor !== false ? $actor : null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue