fix: small fix to post data normalization handling missing posts better

This commit is contained in:
David Bailey 2023-12-23 10:51:07 +01:00
parent 2add216157
commit e777ea5675

View file

@ -55,10 +55,10 @@ class MySQLAdapter {
} }
function _normalize_post_data($post_data) { function _normalize_post_data($post_data) {
if($post_data == null) { $post_data ??= ['found' => null];
return [
"found" => false if(isset($post_data['found']) && $post_data['found'] == false) {
]; return $post_data;
} }
$post_data["found"] = true; $post_data["found"] = true;