fix: small fix to post data normalization handling missing posts better
This commit is contained in:
parent
2add216157
commit
e777ea5675
1 changed files with 5 additions and 5 deletions
|
@ -55,12 +55,12 @@ class MySQLAdapter {
|
|||
}
|
||||
|
||||
function _normalize_post_data($post_data) {
|
||||
if($post_data == null) {
|
||||
return [
|
||||
"found" => false
|
||||
];
|
||||
}
|
||||
$post_data ??= ['found' => null];
|
||||
|
||||
if(isset($post_data['found']) && $post_data['found'] == false) {
|
||||
return $post_data;
|
||||
}
|
||||
|
||||
$post_data["found"] = true;
|
||||
|
||||
$post_data['post_metadata'] = json_decode($post_data["post_metadata"], true) ?? [];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue