From 6e05e54b846451a05c323d6872b2fe2668a03446 Mon Sep 17 00:00:00 2001 From: Marvin Muxfeld Date: Thu, 5 Sep 2024 15:50:36 +0200 Subject: [PATCH] PISHPS-350: reduced log output of ExpireOrderTaskHandler; added type check to CancelLineController --- src/Controller/Api/Order/CancelLineController.php | 2 +- src/ScheduledTask/OrderStatus/ExpireOrderTaskHandler.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Controller/Api/Order/CancelLineController.php b/src/Controller/Api/Order/CancelLineController.php index d54dad5bd..18c3bd1bb 100644 --- a/src/Controller/Api/Order/CancelLineController.php +++ b/src/Controller/Api/Order/CancelLineController.php @@ -35,7 +35,7 @@ public function statusAction(Request $request, Context $context): Response /** @var OrderLine $line */ foreach ($lines as $line) { $metadata = $line->metadata; - if (! property_exists($metadata, 'orderLineItemId')) { + if (!is_object($metadata) || ! property_exists($metadata, 'orderLineItemId')) { continue; } $id = $metadata->orderLineItemId; diff --git a/src/ScheduledTask/OrderStatus/ExpireOrderTaskHandler.php b/src/ScheduledTask/OrderStatus/ExpireOrderTaskHandler.php index 2d1aded3d..7f4969368 100644 --- a/src/ScheduledTask/OrderStatus/ExpireOrderTaskHandler.php +++ b/src/ScheduledTask/OrderStatus/ExpireOrderTaskHandler.php @@ -34,7 +34,7 @@ public function __construct(ScheduledTaskRepositoryInterface $scheduledTaskRepos public function run(): void { - $this->logger->info('Start resetting in_progress orders'); + $this->logger->debug('Start resetting in_progress orders'); $context = new Context(new SystemSource());