Skip to content

Commit b5060d0

Browse files
committed
Add another check
1 parent 69417c8 commit b5060d0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/FeaturedImage.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use function filter_var;
1313
use function get_site_option;
1414
use function is_admin;
15+
use function update_site_option;
1516
use const FILTER_VALIDATE_BOOLEAN;
1617

1718
/**
@@ -88,6 +89,10 @@ private function update(): void
8889
return;
8990
}
9091
$options = get_site_option(self::OPTION_NAME, []);
92+
if (empty($options)) {
93+
update_site_option(self::OPTION_NAME . '_update', 1);
94+
return;
95+
}
9196
foreach ($options as $option => $value) {
9297
if (is_array($value)) {
9398
continue;

0 commit comments

Comments
 (0)