Skip to content

Commit aa3c51f

Browse files
authored
Add null check for document in processItem() (#28)
1 parent 23b0c3b commit aa3c51f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Plugin/QueueWorker/Images.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ public static function create(ContainerInterface $container, array $configuratio
6565
* {@inheritdoc}
6666
*/
6767
public function processItem($data): void {
68-
$document = $this->pantheonContentPublisherStorage->load($data);
68+
if (!$document = $this->pantheonContentPublisherStorage->load($data)) {
69+
return;
70+
}
6971
$content = $document->get('content');
7072
if ($content->isEmpty() || !($pantheon_files = static::getImageData($content->value))) {
7173
return;

0 commit comments

Comments
 (0)