diff --git a/src/Blocks/AbstractBlocksCli.php b/src/Blocks/AbstractBlocksCli.php index 6e2bbdbaa..a1c901d45 100644 --- a/src/Blocks/AbstractBlocksCli.php +++ b/src/Blocks/AbstractBlocksCli.php @@ -67,7 +67,7 @@ protected function moveItems(array $args, string $source, string $destination, s $sourceItems = \array_fill_keys(\array_values($sourceItems), $source); $sourceItemsPrivate = []; - if ($sourcePrivate) { + if (\is_dir($sourcePrivate)) { $sourceItemsPrivate = \array_diff(\scandir($sourcePrivate) ?: [], ['..', '.']); // phpcs:ignore WordPress.PHP.DisallowShortTernary.Found $sourceItemsPrivate = \array_fill_keys(\array_values($sourceItemsPrivate), $sourcePrivate); }