diff --git a/.phpstan.dist.baselines/_loader.php b/.phpstan.dist.baselines/_loader.php index b59aec7395a..5b7114ddfed 100644 --- a/.phpstan.dist.baselines/_loader.php +++ b/.phpstan.dist.baselines/_loader.php @@ -27,7 +27,6 @@ __DIR__ . '/cast.useless.php', __DIR__ . '/catch.neverThrown.php', __DIR__ . '/class.extendsDeprecatedClass.php', - __DIR__ . '/class.nameCase.php', __DIR__ . '/class.notFound.php', __DIR__ . '/classConstant.deprecatedClass.php', __DIR__ . '/clone.nonObject.php', diff --git a/.phpstan.dist.baselines/class.nameCase.php b/.phpstan.dist.baselines/class.nameCase.php deleted file mode 100644 index 86bf72c98b2..00000000000 --- a/.phpstan.dist.baselines/class.nameCase.php +++ /dev/null @@ -1,10 +0,0 @@ - 'Class Mage_Paypal_Block_Express_Form referenced with incorrect case: Mage_PayPal_Block_Express_Form.', - 'count' => 1, - 'path' => __DIR__ . '/../app/design/frontend/base/default/template/paypal/payment/redirect.phtml', -]; - -return ['parameters' => ['ignoreErrors' => $ignoreErrors]]; diff --git a/.phpstan.dist.baselines/empty.notAllowed.php b/.phpstan.dist.baselines/empty.notAllowed.php index f19a68924cd..7448586b711 100644 --- a/.phpstan.dist.baselines/empty.notAllowed.php +++ b/.phpstan.dist.baselines/empty.notAllowed.php @@ -3388,7 +3388,7 @@ ]; $ignoreErrors[] = [ 'rawMessage' => 'Construct empty() is not allowed. Use more strict comparison.', - 'count' => 11, + 'count' => 10, 'path' => __DIR__ . '/../lib/Varien/Object.php', ]; $ignoreErrors[] = [ diff --git a/.phpstan.dist.baselines/offsetAccess.notFound.php b/.phpstan.dist.baselines/offsetAccess.notFound.php index b4fb8b97273..1e4713f063a 100644 --- a/.phpstan.dist.baselines/offsetAccess.notFound.php +++ b/.phpstan.dist.baselines/offsetAccess.notFound.php @@ -256,11 +256,6 @@ 'count' => 1, 'path' => __DIR__ . '/../lib/Varien/Image/Adapter/Gd2.php', ]; -$ignoreErrors[] = [ - 'rawMessage' => 'Offset (int|string) might not exist on array|null.', - 'count' => 1, - 'path' => __DIR__ . '/../lib/Varien/Object.php', -]; $ignoreErrors[] = [ 'rawMessage' => 'Offset 0 might not exist on array|null.', 'count' => 1, diff --git a/.phpstan.dist.baselines/variable.implicitArray.php b/.phpstan.dist.baselines/variable.implicitArray.php index 7962662fb13..a46517c5e10 100644 --- a/.phpstan.dist.baselines/variable.implicitArray.php +++ b/.phpstan.dist.baselines/variable.implicitArray.php @@ -1,161 +1,21 @@ 'Implicit array creation is not allowed - variable $config does not exist.', - 'count' => 1, - 'path' => __DIR__ . '/../app/code/core/Mage/Adminhtml/Block/Catalog/Helper/Form/Wysiwyg/Content.php', -]; -$ignoreErrors[] = [ - 'rawMessage' => 'Implicit array creation is not allowed - variable $actions does not exist.', - 'count' => 1, - 'path' => __DIR__ . '/../app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Grid/Renderer/Action.php', -]; -$ignoreErrors[] = [ - 'rawMessage' => 'Implicit array creation is not allowed - variable $actions might not exist.', - 'count' => 1, - 'path' => __DIR__ . '/../app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Grid/Renderer/Action.php', -]; -$ignoreErrors[] = [ - 'rawMessage' => 'Implicit array creation is not allowed - variable $data does not exist.', - 'count' => 1, - 'path' => __DIR__ . '/../app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Packaging.php', -]; -$ignoreErrors[] = [ - 'rawMessage' => 'Implicit array creation is not allowed - variable $data does not exist.', - 'count' => 1, - 'path' => __DIR__ . '/../app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View/Form.php', -]; -$ignoreErrors[] = [ - 'rawMessage' => 'Implicit array creation is not allowed - variable $params does not exist.', - 'count' => 1, - 'path' => __DIR__ . '/../app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php', -]; -$ignoreErrors[] = [ - 'rawMessage' => 'Implicit array creation is not allowed - variable $data does not exist.', - 'count' => 1, - 'path' => __DIR__ . '/../app/code/core/Mage/Adminhtml/controllers/TagController.php', -]; -$ignoreErrors[] = [ - 'rawMessage' => 'Implicit array creation is not allowed - variable $data might not exist.', - 'count' => 1, - 'path' => __DIR__ . '/../app/code/core/Mage/Adminhtml/controllers/TagController.php', -]; -$ignoreErrors[] = [ - 'rawMessage' => 'Implicit array creation is not allowed - variable $defaultValues might not exist.', - 'count' => 1, - 'path' => __DIR__ . '/../app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle.php', -]; -$ignoreErrors[] = [ - 'rawMessage' => 'Implicit array creation is not allowed - variable $params does not exist.', - 'count' => 1, - 'path' => __DIR__ . '/../app/code/core/Mage/Catalog/Block/Layer/State.php', -]; -$ignoreErrors[] = [ - 'rawMessage' => 'Implicit array creation is not allowed - variable $params does not exist.', - 'count' => 1, - 'path' => __DIR__ . '/../app/code/core/Mage/Catalog/Model/Layer/Filter/Item.php', -]; -$ignoreErrors[] = [ - 'rawMessage' => 'Implicit array creation is not allowed - variable $path does not exist.', - 'count' => 1, - 'path' => __DIR__ . '/../app/code/core/Mage/Catalog/Model/Product/Image.php', -]; -$ignoreErrors[] = [ - 'rawMessage' => 'Implicit array creation is not allowed - variable $updateCond does not exist.', - 'count' => 1, - 'path' => __DIR__ . '/../app/code/core/Mage/Catalog/Model/Resource/Product.php', -]; $ignoreErrors[] = [ 'rawMessage' => 'Implicit array creation is not allowed - variable $pricing does not exist.', 'count' => 1, 'path' => __DIR__ . '/../app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute/Collection.php', ]; -$ignoreErrors[] = [ - 'rawMessage' => 'Implicit array creation is not allowed - variable $search does not exist.', - 'count' => 1, - 'path' => __DIR__ . '/../app/code/core/Mage/CatalogIndex/Model/Indexer/Minimalprice.php', -]; -$ignoreErrors[] = [ - 'rawMessage' => 'Implicit array creation is not allowed - variable $conditions does not exist.', - 'count' => 1, - 'path' => __DIR__ . '/../app/code/core/Mage/CatalogIndex/Model/Resource/Indexer/Abstract.php', -]; -$ignoreErrors[] = [ - 'rawMessage' => 'Implicit array creation is not allowed - variable $conditions does not exist.', - 'count' => 1, - 'path' => __DIR__ . '/../app/code/core/Mage/CatalogIndex/Model/Resource/Indexer/Minimalprice.php', -]; $ignoreErrors[] = [ 'rawMessage' => 'Implicit array creation is not allowed - variable $termKeys might not exist.', 'count' => 1, 'path' => __DIR__ . '/../app/code/core/Mage/CatalogSearch/Block/Term.php', ]; -$ignoreErrors[] = [ - 'rawMessage' => 'Implicit array creation is not allowed - variable $result might not exist.', - 'count' => 3, - 'path' => __DIR__ . '/../app/code/core/Mage/Checkout/controllers/OnepageController.php', -]; -$ignoreErrors[] = [ - 'rawMessage' => 'Implicit array creation is not allowed - variable $data might not exist.', - 'count' => 1, - 'path' => __DIR__ . '/../app/code/core/Mage/Cms/Model/Resource/Page/Collection.php', -]; -$ignoreErrors[] = [ - 'rawMessage' => 'Implicit array creation is not allowed - variable $options might not exist.', - 'count' => 1, - 'path' => __DIR__ . '/../app/code/core/Mage/Core/Model/File/Validator/AvailablePath.php', -]; -$ignoreErrors[] = [ - 'rawMessage' => 'Implicit array creation is not allowed - variable $value does not exist.', - 'count' => 2, - 'path' => __DIR__ . '/../app/code/core/Mage/CurrencySymbol/Model/System/Currencysymbol.php', -]; $ignoreErrors[] = [ 'rawMessage' => 'Implicit array creation is not allowed - variable $fields might not exist.', 'count' => 1, 'path' => __DIR__ . '/../app/code/core/Mage/Dataflow/Model/Session/Parser/Csv.php', ]; -$ignoreErrors[] = [ - 'rawMessage' => 'Implicit array creation is not allowed - variable $dataToInsert does not exist.', - 'count' => 1, - 'path' => __DIR__ . '/../app/code/core/Mage/Downloadable/Model/Resource/Link.php', -]; -$ignoreErrors[] = [ - 'rawMessage' => 'Implicit array creation is not allowed - variable $data does not exist.', - 'count' => 1, - 'path' => __DIR__ . '/../app/code/core/Mage/Newsletter/Model/Resource/Subscriber.php', -]; -$ignoreErrors[] = [ - 'rawMessage' => 'Implicit array creation is not allowed - variable $toplinkInfo does not exist.', - 'count' => 1, - 'path' => __DIR__ . '/../app/code/core/Mage/Page/Block/Html/Toplinks.php', -]; -$ignoreErrors[] = [ - 'rawMessage' => 'Implicit array creation is not allowed - variable $result does not exist.', - 'count' => 1, - 'path' => __DIR__ . '/../app/code/core/Mage/Paygate/controllers/Adminhtml/Paygate/Authorizenet/PaymentController.php', -]; -$ignoreErrors[] = [ - 'rawMessage' => 'Implicit array creation is not allowed - variable $result does not exist.', - 'count' => 1, - 'path' => __DIR__ . '/../app/code/core/Mage/Paygate/controllers/Authorizenet/PaymentController.php', -]; -$ignoreErrors[] = [ - 'rawMessage' => 'Implicit array creation is not allowed - variable $lines does not exist.', - 'count' => 1, - 'path' => __DIR__ . '/../app/code/core/Mage/Sales/Model/Order/Pdf/Creditmemo.php', -]; -$ignoreErrors[] = [ - 'rawMessage' => 'Implicit array creation is not allowed - variable $lines does not exist.', - 'count' => 1, - 'path' => __DIR__ . '/../app/code/core/Mage/Sales/Model/Order/Pdf/Invoice.php', -]; -$ignoreErrors[] = [ - 'rawMessage' => 'Implicit array creation is not allowed - variable $lines does not exist.', - 'count' => 1, - 'path' => __DIR__ . '/../app/code/core/Mage/Sales/Model/Order/Pdf/Shipment.php', -]; $ignoreErrors[] = [ 'rawMessage' => 'Implicit array creation is not allowed - variable $itemCollsX might not exist.', 'count' => 1, @@ -196,20 +56,5 @@ 'count' => 2, 'path' => __DIR__ . '/../lib/Varien/Convert/Parser/Csv.php', ]; -$ignoreErrors[] = [ - 'rawMessage' => 'Implicit array creation is not allowed - variable $group does not exist.', - 'count' => 1, - 'path' => __DIR__ . '/../lib/Varien/Io/File.php', -]; -$ignoreErrors[] = [ - 'rawMessage' => 'Implicit array creation is not allowed - variable $owner does not exist.', - 'count' => 1, - 'path' => __DIR__ . '/../lib/Varien/Io/File.php', -]; -$ignoreErrors[] = [ - 'rawMessage' => 'Implicit array creation is not allowed - variable $world does not exist.', - 'count' => 1, - 'path' => __DIR__ . '/../lib/Varien/Io/File.php', -]; return ['parameters' => ['ignoreErrors' => $ignoreErrors]]; diff --git a/.phpstan.dist.baselines/variable.undefined.php b/.phpstan.dist.baselines/variable.undefined.php index 71a65a78611..89868d73ffd 100644 --- a/.phpstan.dist.baselines/variable.undefined.php +++ b/.phpstan.dist.baselines/variable.undefined.php @@ -16,11 +16,6 @@ 'count' => 2, 'path' => __DIR__ . '/../app/code/core/Mage/Api2/Model/Acl/Global/Rule/Tree.php', ]; -$ignoreErrors[] = [ - 'rawMessage' => 'Variable $defaultValues might not be defined.', - 'count' => 1, - 'path' => __DIR__ . '/../app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle.php', -]; $ignoreErrors[] = [ 'rawMessage' => 'Variable $productId might not be defined.', 'count' => 1, diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Helper/Form/Wysiwyg/Content.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Helper/Form/Wysiwyg/Content.php index 023779d30ca..74407fcec92 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Helper/Form/Wysiwyg/Content.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Helper/Form/Wysiwyg/Content.php @@ -25,6 +25,7 @@ protected function _prepareForm() { $form = new Varien_Data_Form(['id' => 'wysiwyg_edit_form', 'action' => $this->getDataByKey('action'), 'method' => 'post']); + $config = []; $config['document_base_url'] = $this->getDataByKey('store_media_url'); $config['store_id'] = $this->getDataByKey('store_id'); $config['add_variables'] = false; diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Grid/Renderer/Action.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Grid/Renderer/Action.php index a3fc321a9af..91027e52158 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Grid/Renderer/Action.php +++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Grid/Renderer/Action.php @@ -23,6 +23,8 @@ class Mage_Adminhtml_Block_Newsletter_Template_Grid_Renderer_Action extends Mage #[Override] public function render(Varien_Object $row) { + $actions = []; + if ($row->isValidForSend()) { $actions[] = [ 'url' => $this->getUrl('*/newsletter_queue/edit', ['template_id' => $row->getId()]), diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Packaging.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Packaging.php index 23736c53640..4a096367d7c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Packaging.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Packaging.php @@ -7,7 +7,6 @@ * @package Mage_Adminhtml */ - /** * Adminhtml shipment packaging * @@ -266,6 +265,7 @@ public function getDeliveryConfirmationTypes() */ public function getPrintButton() { + $data = []; $data['shipment_id'] = $this->getShipment()->getId(); $url = $this->getUrl('*/sales_order_shipment/printPackage', $data); return $this->getLayout() diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View/Form.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View/Form.php index 3906ecd0155..0e2ba7184dd 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View/Form.php @@ -69,6 +69,7 @@ public function getCreateLabelButton() */ public function getPrintLabelButton() { + $data = []; $data['shipment_id'] = $this->getShipment()->getId(); $url = $this->getUrl('*/sales_order_shipment/printLabel', $data); return $this->getLayout() diff --git a/app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php b/app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php index 9281cca35c5..6737893e91b 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php @@ -89,6 +89,7 @@ public function addAction() */ public function editAction() { + $params = []; $params['_current'] = true; $redirect = false; diff --git a/app/code/core/Mage/Adminhtml/controllers/TagController.php b/app/code/core/Mage/Adminhtml/controllers/TagController.php index fc0680b6ddc..b94ee86833a 100644 --- a/app/code/core/Mage/Adminhtml/controllers/TagController.php +++ b/app/code/core/Mage/Adminhtml/controllers/TagController.php @@ -127,10 +127,12 @@ public function editAction() /** * Save tag action - * @return $this|void + * @return $this */ public function saveAction() { + $data = []; + if ($postData = $this->getRequest()->getPost()) { if (isset($postData['tag_id'])) { $data['tag_id'] = $postData['tag_id']; diff --git a/app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle.php b/app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle.php index 4691358b803..3f821b7712f 100644 --- a/app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle.php +++ b/app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle.php @@ -93,22 +93,23 @@ public function hasOptions() public function getJsonConfig() { Mage::app()->getLocale()->getJsPriceFormat(); - $optionsArray = $this->getOptions(); - $options = []; - $selected = []; - $currentProduct = $this->getProduct(); + $options = []; + $selected = []; + $defaultValues = []; + /** @var Mage_Core_Helper_Data $coreHelper */ $coreHelper = Mage::helper('core'); /** @var Mage_Bundle_Model_Product_Price $bundlePriceModel */ $bundlePriceModel = Mage::getModel('bundle/product_price'); + $currentProduct = $this->getProduct(); $preConfiguredFlag = $currentProduct->hasPreconfiguredValues(); if ($preConfiguredFlag) { $preConfiguredValues = $currentProduct->getPreconfiguredValues(); - $defaultValues = []; } $position = 0; + $optionsArray = $this->getOptions(); foreach ($optionsArray as $bundleOption) { /** @var Mage_Bundle_Model_Option $bundleOption */ if (!$bundleOption->getSelections()) { diff --git a/app/code/core/Mage/Catalog/Block/Layer/State.php b/app/code/core/Mage/Catalog/Block/Layer/State.php index 93cb32064c6..5811de4051f 100644 --- a/app/code/core/Mage/Catalog/Block/Layer/State.php +++ b/app/code/core/Mage/Catalog/Block/Layer/State.php @@ -53,10 +53,12 @@ public function getClearUrl() $filterState[$filter->getRequestVar()] = $filter->getCleanValue(); } + $params = []; $params['_current'] = true; $params['_use_rewrite'] = true; $params['_query'] = $filterState; $params['_escape'] = true; + return Mage::getUrl('*/*/*', $params); } diff --git a/app/code/core/Mage/Catalog/Model/Layer/Filter/Item.php b/app/code/core/Mage/Catalog/Model/Layer/Filter/Item.php index d1802578a48..6f80a1e1013 100644 --- a/app/code/core/Mage/Catalog/Model/Layer/Filter/Item.php +++ b/app/code/core/Mage/Catalog/Model/Layer/Filter/Item.php @@ -61,10 +61,13 @@ public function getUrl() public function getRemoveUrl() { $query = [$this->getFilter()->getRequestVar() => $this->getFilter()->getResetValue()]; + + $params = []; $params['_current'] = true; $params['_use_rewrite'] = true; $params['_query'] = $query; $params['_escape'] = true; + return Mage::getUrl('*/*/*', $params); } diff --git a/app/code/core/Mage/Catalog/Model/Product/Image.php b/app/code/core/Mage/Catalog/Model/Product/Image.php index a5da2defafa..c7422b00d23 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Image.php +++ b/app/code/core/Mage/Catalog/Model/Product/Image.php @@ -438,12 +438,15 @@ public function setBaseFile($file) $this->_baseFile = $baseFile; // build new filename (most important params) + $path = []; + $path = [ self::$_baseMediaPath, 'cache', Mage::app()->getStore()->getId(), $path[] = $this->getDestinationSubdir(), ]; + if ((!empty($this->_width)) || (!empty($this->_height))) { $path[] = "{$this->_width}x{$this->_height}"; } diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product.php b/app/code/core/Mage/Catalog/Model/Resource/Product.php index a1354a9dd10..e65123ed271 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Product.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product.php @@ -623,9 +623,12 @@ public function duplicate($oldId, $newId) $statusAttribute = $this->getAttribute('status'); $statusAttributeId = $statusAttribute->getAttributeId(); $statusAttributeTable = $statusAttribute->getBackend()->getTable(); - $updateCond[] = 'store_id > 0'; - $updateCond[] = $adapter->quoteInto('entity_id = ?', $newId); - $updateCond[] = $adapter->quoteInto('attribute_id = ?', $statusAttributeId); + + $updateCond = []; + $updateCond[] = 'store_id > 0'; + $updateCond[] = $adapter->quoteInto('entity_id = ?', $newId); + $updateCond[] = $adapter->quoteInto('attribute_id = ?', $statusAttributeId); + $adapter->update( $statusAttributeTable, ['value' => Mage_Catalog_Model_Product_Status::STATUS_DISABLED], diff --git a/app/code/core/Mage/CatalogIndex/Model/Indexer/Minimalprice.php b/app/code/core/Mage/CatalogIndex/Model/Indexer/Minimalprice.php index ae4cd81f14a..872877134cd 100644 --- a/app/code/core/Mage/CatalogIndex/Model/Indexer/Minimalprice.php +++ b/app/code/core/Mage/CatalogIndex/Model/Indexer/Minimalprice.php @@ -108,11 +108,12 @@ public function createIndexData(Mage_Catalog_Model_Product $object, ?Mage_Eav_Mo } $result = []; - $data = []; + $data = []; $data['store_id'] = $object->getStoreId(); $data['entity_id'] = $object->getId(); + $search = []; $search['store_id'] = $object->getStoreId(); $search['entity_id'] = $searchEntityId; $search['attribute_id'] = $priceAttributeId; diff --git a/app/code/core/Mage/CatalogIndex/Model/Resource/Indexer/Abstract.php b/app/code/core/Mage/CatalogIndex/Model/Resource/Indexer/Abstract.php index 9e5ed1caaa1..32659acdaed 100644 --- a/app/code/core/Mage/CatalogIndex/Model/Resource/Indexer/Abstract.php +++ b/app/code/core/Mage/CatalogIndex/Model/Resource/Indexer/Abstract.php @@ -86,6 +86,7 @@ protected function _executeReplace($data, $storeId, $productId) */ public function cleanup($productId, $storeId = null, $attributeId = null) { + $conditions = []; $conditions[] = $this->_getWriteAdapter()->quoteInto("{$this->_entityIdFieldName} = ?", $productId); if (!is_null($storeId)) { diff --git a/app/code/core/Mage/CatalogIndex/Model/Resource/Indexer/Minimalprice.php b/app/code/core/Mage/CatalogIndex/Model/Resource/Indexer/Minimalprice.php index 31e29ac2187..78066b81200 100644 --- a/app/code/core/Mage/CatalogIndex/Model/Resource/Indexer/Minimalprice.php +++ b/app/code/core/Mage/CatalogIndex/Model/Resource/Indexer/Minimalprice.php @@ -53,6 +53,7 @@ public function getMinimalValue($conditions) #[Override] public function cleanup($productId, $storeId = null, $attributeId = null) { + $conditions = []; $conditions[] = $this->_getWriteAdapter()->quoteInto("{$this->_entityIdFieldName} = ?", $productId); if (!is_null($storeId)) { diff --git a/app/code/core/Mage/Checkout/controllers/OnepageController.php b/app/code/core/Mage/Checkout/controllers/OnepageController.php index 61f069da236..ea4999df674 100644 --- a/app/code/core/Mage/Checkout/controllers/OnepageController.php +++ b/app/code/core/Mage/Checkout/controllers/OnepageController.php @@ -497,6 +497,8 @@ public function savePaymentAction() return; } + $result = []; + try { if (!$this->getRequest()->isPost()) { $this->_ajaxRedirectResponse(); diff --git a/app/code/core/Mage/Cms/Model/Resource/Page/Collection.php b/app/code/core/Mage/Cms/Model/Resource/Page/Collection.php index 834b5a1424c..20820c4db6e 100644 --- a/app/code/core/Mage/Cms/Model/Resource/Page/Collection.php +++ b/app/code/core/Mage/Cms/Model/Resource/Page/Collection.php @@ -54,6 +54,7 @@ public function toOptionIdArray() foreach ($this as $item) { $identifier = $item->getDataByKey('identifier'); + $data = []; $data['value'] = $identifier; $data['label'] = $item->getDataByKey('title'); diff --git a/app/code/core/Mage/Core/Model/File/Validator/AvailablePath.php b/app/code/core/Mage/Core/Model/File/Validator/AvailablePath.php index e7e4b5a1910..7f5ad8931b8 100644 --- a/app/code/core/Mage/Core/Model/File/Validator/AvailablePath.php +++ b/app/code/core/Mage/Core/Model/File/Validator/AvailablePath.php @@ -252,6 +252,7 @@ protected function _isValidByPaths($valuePathInfo, $paths, $protected) $path = ltrim($path, '\\/'); if (!isset($this->_pathsData[$path]['regFilename'])) { $pathInfo = pathinfo($path); + $options = []; $options['file_mask'] = $pathInfo['basename']; if ($pathInfo['dirname'] == '.' || $pathInfo['dirname'] == DS) { $pathInfo['dirname'] = ''; diff --git a/app/code/core/Mage/CurrencySymbol/Model/System/Currencysymbol.php b/app/code/core/Mage/CurrencySymbol/Model/System/Currencysymbol.php index cb846812be8..8dd885f8e99 100644 --- a/app/code/core/Mage/CurrencySymbol/Model/System/Currencysymbol.php +++ b/app/code/core/Mage/CurrencySymbol/Model/System/Currencysymbol.php @@ -192,6 +192,7 @@ public function setCurrencySymbolsData($symbols = []) } } + $value = []; if ($symbols) { $value['options']['fields']['customsymbol']['value'] = serialize($symbols); } else { diff --git a/app/code/core/Mage/Downloadable/Model/Resource/Link.php b/app/code/core/Mage/Downloadable/Model/Resource/Link.php index b722d5decf8..600fa95429e 100644 --- a/app/code/core/Mage/Downloadable/Model/Resource/Link.php +++ b/app/code/core/Mage/Downloadable/Model/Resource/Link.php @@ -71,6 +71,8 @@ public function saveItemTitleAndPrice($linkObject) ); } + $dataToInsert = []; + $select = $writeAdapter->select() ->from($linkPriceTable) ->where('link_id=:link_id AND website_id=:website_id'); diff --git a/app/code/core/Mage/Newsletter/Model/Resource/Subscriber.php b/app/code/core/Mage/Newsletter/Model/Resource/Subscriber.php index 97a56f14066..6dc3e840940 100644 --- a/app/code/core/Mage/Newsletter/Model/Resource/Subscriber.php +++ b/app/code/core/Mage/Newsletter/Model/Resource/Subscriber.php @@ -137,6 +137,7 @@ public function received(Mage_Newsletter_Model_Subscriber $subscriber, Mage_News { $this->_write->beginTransaction(); try { + $data = []; $data['letter_sent_at'] = Mage::getSingleton('core/date')->gmtDate(); $this->_write->update($this->_subscriberLinkTable, $data, [ 'subscriber_id = ?' => $subscriber->getId(), diff --git a/app/code/core/Mage/Page/Block/Html/Toplinks.php b/app/code/core/Mage/Page/Block/Html/Toplinks.php index 0b98ec10769..9cf9a80cc7c 100644 --- a/app/code/core/Mage/Page/Block/Html/Toplinks.php +++ b/app/code/core/Mage/Page/Block/Html/Toplinks.php @@ -61,6 +61,7 @@ public function addLink($liParams, $aParams, $innerText, $position = '', $before $params .= ' ' . $liParams; } + $toplinkInfo = []; $toplinkInfo['liParams'] = $params; $params = ''; if (!empty($aParams) && is_array($aParams)) { diff --git a/app/code/core/Mage/Paygate/controllers/Adminhtml/Paygate/Authorizenet/PaymentController.php b/app/code/core/Mage/Paygate/controllers/Adminhtml/Paygate/Authorizenet/PaymentController.php index 2fe90743698..0530cc5de63 100644 --- a/app/code/core/Mage/Paygate/controllers/Adminhtml/Paygate/Authorizenet/PaymentController.php +++ b/app/code/core/Mage/Paygate/controllers/Adminhtml/Paygate/Authorizenet/PaymentController.php @@ -26,7 +26,9 @@ class Mage_Paygate_Adminhtml_Paygate_Authorizenet_PaymentController extends Mage */ public function cancelAction() { + $result = []; $result['success'] = false; + try { $paymentMethod = Mage::helper('payment')->getMethodInstance(Mage_Paygate_Model_Authorizenet::METHOD_CODE); if ($paymentMethod) { diff --git a/app/code/core/Mage/Paygate/controllers/Authorizenet/PaymentController.php b/app/code/core/Mage/Paygate/controllers/Authorizenet/PaymentController.php index 028171b0b62..b2a35966de0 100644 --- a/app/code/core/Mage/Paygate/controllers/Authorizenet/PaymentController.php +++ b/app/code/core/Mage/Paygate/controllers/Authorizenet/PaymentController.php @@ -20,7 +20,9 @@ class Mage_Paygate_Authorizenet_PaymentController extends Mage_Core_Controller_F */ public function cancelAction() { + $result = []; $result['success'] = false; + try { $paymentMethod = Mage::helper('payment')->getMethodInstance(Mage_Paygate_Model_Authorizenet::METHOD_CODE); if ($paymentMethod) { diff --git a/app/code/core/Mage/Sales/Model/Order/Pdf/Creditmemo.php b/app/code/core/Mage/Sales/Model/Order/Pdf/Creditmemo.php index f063da7a654..843cfddac92 100644 --- a/app/code/core/Mage/Sales/Model/Order/Pdf/Creditmemo.php +++ b/app/code/core/Mage/Sales/Model/Order/Pdf/Creditmemo.php @@ -27,6 +27,8 @@ protected function _drawHeader(Zend_Pdf_Page $page) $this->y -= 10; $page->setFillColor(new Zend_Pdf_Color_Rgb(0, 0, 0)); + $lines = []; + //columns headers $lines[0][] = [ 'text' => Mage::helper('sales')->__('Products'), diff --git a/app/code/core/Mage/Sales/Model/Order/Pdf/Invoice.php b/app/code/core/Mage/Sales/Model/Order/Pdf/Invoice.php index 906e2b844d2..a228fde14d0 100644 --- a/app/code/core/Mage/Sales/Model/Order/Pdf/Invoice.php +++ b/app/code/core/Mage/Sales/Model/Order/Pdf/Invoice.php @@ -28,6 +28,8 @@ protected function _drawHeader(Zend_Pdf_Page $page) $this->y -= 10; $page->setFillColor(new Zend_Pdf_Color_Rgb(0, 0, 0)); + $lines = []; + //columns headers $lines[0][] = [ 'text' => Mage::helper('sales')->__('Products'), diff --git a/app/code/core/Mage/Sales/Model/Order/Pdf/Shipment.php b/app/code/core/Mage/Sales/Model/Order/Pdf/Shipment.php index 0908950b470..a155b29d068 100644 --- a/app/code/core/Mage/Sales/Model/Order/Pdf/Shipment.php +++ b/app/code/core/Mage/Sales/Model/Order/Pdf/Shipment.php @@ -28,6 +28,8 @@ protected function _drawHeader(Zend_Pdf_Page $page) $this->y -= 10; $page->setFillColor(new Zend_Pdf_Color_Rgb(0, 0, 0)); + $lines = []; + //columns headers $lines[0][] = [ 'text' => Mage::helper('sales')->__('Products'), diff --git a/app/design/frontend/base/default/template/paypal/payment/redirect.phtml b/app/design/frontend/base/default/template/paypal/payment/redirect.phtml index 6177e2dc22a..8da2d733f88 100644 --- a/app/design/frontend/base/default/template/paypal/payment/redirect.phtml +++ b/app/design/frontend/base/default/template/paypal/payment/redirect.phtml @@ -8,9 +8,9 @@ ?>