diff --git a/src/Utility.php b/src/Utility.php index 9461280..3d0f049 100644 --- a/src/Utility.php +++ b/src/Utility.php @@ -284,10 +284,9 @@ public static function unpublishUrl(string $url, string $message = '', bool $log return; } - $response = \Drupal::service('event_dispatcher')->dispatch(new QuantEvent('', $url, [], NULL), QuantEvent::UNPUBLISH); + \Drupal::service('event_dispatcher')->dispatch(new QuantEvent('', $url, [], NULL), QuantEvent::UNPUBLISH); - // Only log if it's not a 404. - if ($log && $response) { + if ($log) { if (empty($message)) { $message = 'Unpublished url'; }