Skip to content

Commit

Permalink
🐛 do not set empty fields
Browse files Browse the repository at this point in the history
  • Loading branch information
bnomei committed Jul 2, 2024
1 parent 1d3b4d9 commit 8ad82e5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions classes/ModelWithKhulan.php
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,11 @@ public function decodeKhulan(?array $data = []): array
}
}

// remove any empty values
$copy = array_filter($copy, function ($value) {
return ! empty($value);
});

return $copy;
}
}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bnomei/kirby-mongodb",
"type": "kirby-plugin",
"version": "1.0.0",
"version": "1.0.1",
"description": "Khulan is a cache driver and content cache with NoSQL interface for Kirby using MongoDB",
"license": "MIT",
"authors": [
Expand Down
8 changes: 4 additions & 4 deletions vendor/composer/installed.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php return array(
'root' => array(
'name' => 'bnomei/kirby-mongodb',
'pretty_version' => '1.0.0',
'version' => '1.0.0.0',
'pretty_version' => '1.0.1',
'version' => '1.0.1.0',
'reference' => null,
'type' => 'kirby-plugin',
'install_path' => __DIR__ . '/../../',
Expand All @@ -11,8 +11,8 @@
),
'versions' => array(
'bnomei/kirby-mongodb' => array(
'pretty_version' => '1.0.0',
'version' => '1.0.0.0',
'pretty_version' => '1.0.1',
'version' => '1.0.1.0',
'reference' => null,
'type' => 'kirby-plugin',
'install_path' => __DIR__ . '/../../',
Expand Down

0 comments on commit 8ad82e5

Please sign in to comment.