diff --git a/.github/workflows/phpcs.yml b/.github/workflows/phpcs.yml
index 580bc27aad5..669c4276c7c 100644
--- a/.github/workflows/phpcs.yml
+++ b/.github/workflows/phpcs.yml
@@ -7,17 +7,9 @@ on:
jobs:
phpcs:
- name: ${{ matrix.rules.label }}
+ name: Validation
runs-on: [ubuntu-latest]
- strategy:
- matrix:
- rules:
- - label: Ecg
- path: .phpcs.dist.ecg.xml
- - label: PhpCompatibility
- path: .phpcs.dist.php.xml
-
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
@@ -42,4 +34,4 @@ jobs:
run: composer install --prefer-dist --no-progress --ignore-platform-req=ext-*
- name: PHPCodeSniffer
- run: php vendor/bin/phpcs -s -p --report=full --standard=${{ matrix.rules.path }}
+ run: php vendor/bin/phpcs -s -p --report=full --standard=.phpcs.dist.xml
diff --git a/.phpcs.dist.php.xml b/.phpcs.dist.php.xml
deleted file mode 100644
index 13a31978800..00000000000
--- a/.phpcs.dist.php.xml
+++ /dev/null
@@ -1,76 +0,0 @@
-
-
- api.php
- cron.php
- get.php
- index.php
- install.php
- app/Mage.php
- app/code/core/Mage/
- errors/
- lib/Mage/
- lib/Magento/
- lib/Varien/
- shell/
- tests/unit/
-
-
- */Varien/Object.php*
- */Varien/Data/Form/Abstract.php*
- */Varien/Db/Tree.php*
- */Varien/Directory/Collection.php*
-
-
- */Magento/Crypt.php*
- */Varien/Crypt/Mcrypt.php*
-
-
- */Varien/Crypt/Mcrypt.php*
-
-
- */Magento/Crypt.php*
- */Varien/Crypt/Mcrypt.php*
-
-
- */Varien/Crypt/Mcrypt.php*
-
-
- */Varien/Crypt/Mcrypt.php*
-
-
- */Magento/Crypt.php*
- */Varien/Crypt/Mcrypt.php*
-
-
- */Magento/Crypt.php*
- */Varien/Crypt/Mcrypt.php*
-
-
- */Magento/Crypt.php*
- */Varien/Crypt/Mcrypt.php*
-
-
- */Magento/Crypt.php*
- */Varien/Crypt/Mcrypt.php*
-
-
- */Magento/Crypt.php*
- */Varien/Crypt/Mcrypt.php*
-
-
- */Magento/Crypt.php*
- */Varien/Crypt/Mcrypt.php*
-
-
- */Magento/Crypt.php*
- */Varien/Crypt/Mcrypt.php*
-
-
- */Magento/Crypt.php*
- */Varien/Crypt/Mcrypt.php*
-
-
- */Magento/Crypt.php*
- */Varien/Crypt/Mcrypt.php*
-
-
diff --git a/.phpcs.dist.ecg.xml b/.phpcs.dist.xml
similarity index 63%
rename from .phpcs.dist.ecg.xml
rename to .phpcs.dist.xml
index 36665bd7db4..615f2fd5c55 100644
--- a/.phpcs.dist.ecg.xml
+++ b/.phpcs.dist.xml
@@ -1,5 +1,5 @@
-
+
api.php
cron.php
get.php
@@ -12,6 +12,7 @@
lib/Magento/
lib/Varien/
shell/
+ tests/unit/
*/core/Mage/*/data/*
*/core/Mage/*/sql/*
@@ -143,4 +144,65 @@
+
+
+
+ */Varien/Object.php*
+ */Varien/Data/Form/Abstract.php*
+ */Varien/Db/Tree.php*
+ */Varien/Directory/Collection.php*
+
+
+ */Magento/Crypt.php*
+ */Varien/Crypt/Mcrypt.php*
+
+
+ */Varien/Crypt/Mcrypt.php*
+
+
+ */Magento/Crypt.php*
+ */Varien/Crypt/Mcrypt.php*
+
+
+ */Varien/Crypt/Mcrypt.php*
+
+
+ */Varien/Crypt/Mcrypt.php*
+
+
+ */Magento/Crypt.php*
+ */Varien/Crypt/Mcrypt.php*
+
+
+ */Magento/Crypt.php*
+ */Varien/Crypt/Mcrypt.php*
+
+
+ */Magento/Crypt.php*
+ */Varien/Crypt/Mcrypt.php*
+
+
+ */Magento/Crypt.php*
+ */Varien/Crypt/Mcrypt.php*
+
+
+ */Magento/Crypt.php*
+ */Varien/Crypt/Mcrypt.php*
+
+
+ */Magento/Crypt.php*
+ */Varien/Crypt/Mcrypt.php*
+
+
+ */Magento/Crypt.php*
+ */Varien/Crypt/Mcrypt.php*
+
+
+ */Magento/Crypt.php*
+ */Varien/Crypt/Mcrypt.php*
+
+
+ */Magento/Crypt.php*
+ */Varien/Crypt/Mcrypt.php*
+
diff --git a/.phpcs.xml b/.phpcs.xml
deleted file mode 100644
index c3e7a9cb330..00000000000
--- a/.phpcs.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
diff --git a/README.md b/README.md
index e81d7c212ef..4333b565b2c 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,4 @@
[![All Contributors](https://img.shields.io/github/all-contributors/openmage/magento-lts?color=ee8449)](#contributors)
-[![Version](http://poser.pugx.org/openmage/magento-lts/version)](https://packagist.org/packages/openmage/magento-lts)
![https://packagist.org/packages/openmage/magento-lts](https://poser.pugx.org/openmage/magento-lts/license.svg)
![https://packagist.org/packages/openmage/magento-lts](https://poser.pugx.org/openmage/magento-lts/d/total.svg)
![https://github.com/openmage/magento-lts/actions/workflows/security-php.yml](https://github.com/openmage/magento-lts/actions/workflows/security-php.yml/badge.svg)
diff --git a/app/code/core/Mage/Captcha/Model/Observer.php b/app/code/core/Mage/Captcha/Model/Observer.php
index 6e122069a02..57b302cc680 100644
--- a/app/code/core/Mage/Captcha/Model/Observer.php
+++ b/app/code/core/Mage/Captcha/Model/Observer.php
@@ -274,7 +274,7 @@ protected function _resetAttempt($login)
protected function _getCaptchaString($request, $formId)
{
$captchaParams = $request->getPost(Mage_Captcha_Helper_Data::INPUT_NAME_FIELD_VALUE);
- return $captchaParams[$formId];
+ return $captchaParams[$formId] ?? '';
}
/**
diff --git a/app/code/core/Mage/Core/Model/Session.php b/app/code/core/Mage/Core/Model/Session.php
index 12de2773424..e6b245a2830 100644
--- a/app/code/core/Mage/Core/Model/Session.php
+++ b/app/code/core/Mage/Core/Model/Session.php
@@ -28,7 +28,6 @@
* @method $this setCurrencyCode(string $value)
* @method $this setFormData(array $value)
* @method int getJustVotedPoll()
- * @method array getOrderIds()
* @method $this setOrderIds(array $value)
* @method $this setJustVotedPoll(int $value)
* @method $this setLastUrl(string $value)
@@ -75,4 +74,9 @@ public function validateFormKey($formKey)
{
return ($formKey === $this->getFormKey());
}
+
+ public function getOrderIds(bool $clear = false): array
+ {
+ return $this->getData('order_ids', $clear) ?? [];
+ }
}
diff --git a/app/code/core/Mage/Tax/etc/config.xml b/app/code/core/Mage/Tax/etc/config.xml
index 6d673ed8d34..1ef4fcfbd76 100644
--- a/app/code/core/Mage/Tax/etc/config.xml
+++ b/app/code/core/Mage/Tax/etc/config.xml
@@ -17,7 +17,7 @@
- 1.6.0.4
+ 1.6.0.5
diff --git a/app/code/core/Mage/Tax/sql/tax_setup/upgrade-1.6.0.4-1.6.0.5.php b/app/code/core/Mage/Tax/sql/tax_setup/upgrade-1.6.0.4-1.6.0.5.php
new file mode 100644
index 00000000000..72e4c3e3906
--- /dev/null
+++ b/app/code/core/Mage/Tax/sql/tax_setup/upgrade-1.6.0.4-1.6.0.5.php
@@ -0,0 +1,35 @@
+startSetup();
+
+$taxTable = $this->getTable('tax/sales_order_tax');
+$orderTable = $this->getTable('sales/order');
+
+// adds FK_SALES_ORDER_TAX_ORDER back again
+$this->getConnection()->addForeignKey(
+ $this->getFkName($taxTable, 'order_id', $orderTable, 'entity_id'),
+ $taxTable,
+ 'order_id',
+ $orderTable,
+ 'entity_id',
+ Varien_Db_Adapter_Interface::FK_ACTION_CASCADE,
+ Varien_Db_Adapter_Interface::FK_ACTION_CASCADE,
+ true
+);
+
+$this->endSetup();