Skip to content

Commit

Permalink
Fix for 1750
Browse files Browse the repository at this point in the history
  • Loading branch information
sowbiba committed Jan 23, 2023
1 parent 6f689d3 commit eca3085
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/UpgradeTracker.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
use Db;
use Module;
use PrestaShopLogger;
use Psr\Log\LoggerInterface;
use Shop;
use Symfony\Component\Dotenv\Dotenv;

Expand Down Expand Up @@ -65,10 +66,10 @@ public function postTracking(Module $module, string $nextVersion = null)
} catch (\Exception $e) {
$message = 'Upgrade tracking on Distribution failed : ' . $e->getMessage();
$logger = $module->get('logger');
if (null !== $logger) {
if ($logger instanceof LoggerInterface) {
$logger->warning($message);
}
PrestaShopLogger::addLog($message, PrestaShopLogger::LOG_SEVERITY_LEVEL_WARNING);
PrestaShopLogger::addLog($message, 2);
}

return true;
Expand Down

0 comments on commit eca3085

Please sign in to comment.