Skip to content

Commit

Permalink
Removed response logic in unpublish logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
kepol committed Mar 6, 2024
1 parent d0641db commit b357021
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Utility.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
Expand Down

0 comments on commit b357021

Please sign in to comment.