Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hgati/1ed2383cba70affb3d5a51d011183a94 to your computer and use it in GitHub Desktop.
Save hgati/1ed2383cba70affb3d5a51d011183a94 to your computer and use it in GitHub Desktop.
Magento2 DeleteOrders Patch #2
From 8946f7f59aee74300477b2e7bb5b58cd39b225bb Mon Sep 17 00:00:00 2001
From: Dennis <cobays@gmail.com>
Date: Wed, 25 Oct 2023 13:29:29 +0900
Subject: [PATCH 2/2] Fixed an error must be of the type int, "null" returned.
---
Console/Command/DeleteOrdersCommand.php | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Console/Command/DeleteOrdersCommand.php b/Console/Command/DeleteOrdersCommand.php
index 0fd92f9..e2689fa 100644
--- a/Console/Command/DeleteOrdersCommand.php
+++ b/Console/Command/DeleteOrdersCommand.php
@@ -90,6 +90,8 @@ class DeleteOrdersCommand extends Command
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
+ $exitCode = 0;
+
try {
if (!$this->helper->getAvailability('cli-command')) {
@@ -132,5 +134,7 @@ class DeleteOrdersCommand extends Command
));
$exitCode = 1;
}
+
+ return $exitCode;
}
}
--
2.34.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment