Skip to content

Commit

Permalink
Merge branch '1.9.4.x' into first_release_builder_workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
fballiano authored Dec 14, 2022
2 parents cdcf5b9 + e726410 commit 5e695d2
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 70 deletions.
5 changes: 4 additions & 1 deletion app/code/core/Mage/Captcha/Model/Zend.php
Original file line number Diff line number Diff line change
Expand Up @@ -448,11 +448,14 @@ protected function _getTargetForms()
/**
* Get captcha word
*
* @return string
* @return string|null
*/
public function getWord()
{
$sessionData = $this->getSession()->getData($this->_getFormIdKey(self::SESSION_WORD));
if (!is_array($sessionData)) {
return null;
}
return time() < $sessionData['expires'] ? $sessionData['data'] : null;
}

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"magento-ecg/coding-standard": "^4.5",
"phpcompatibility/php-compatibility": "^9.3",
"phpmd/phpmd": "^2.13",
"phpstan/phpstan": "^1.9.2",
"phpstan/phpstan": "^1.9.3",
"phpunit/phpunit": "^9.5",
"squizlabs/php_codesniffer": "^3.7"
},
Expand Down
14 changes: 7 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion lib/Magento/Db/Adapter/Pdo/Mysql.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,10 @@ protected function _quote($value)
$value = $this->_convertFloat($value);
return $value;
}

// Fix for null-byte injection
if (is_string($value)) {
$value = addcslashes($value, "\000\032");
}
return parent::_quote($value);
}

Expand Down
4 changes: 1 addition & 3 deletions lib/Zend/Db/Adapter/Pdo/Abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -292,10 +292,8 @@ protected function _quote($value)
if (is_int($value) || is_float($value)) {
return $value;
}
// Fix for null-byte injection
$value = addcslashes($value, "\000\032");
$this->_connect();
return $this->_connection->quote($value);
return $this->_connection->quote((string) $value);
}

/**
Expand Down
59 changes: 2 additions & 57 deletions phpstan.dist.baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -1085,11 +1085,6 @@ parameters:
count: 1
path: app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Shipping/Address.php

-
message: "#^Variable \\$button might not be defined\\.$#"
count: 1
path: app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar.php

-
message: "#^If condition is always true\\.$#"
count: 1
Expand Down Expand Up @@ -3235,21 +3230,6 @@ parameters:
count: 1
path: app/code/core/Mage/Bundle/Model/Resource/Price/Index.php

-
message: "#^Variable \\$priceCond might not be defined\\.$#"
count: 1
path: app/code/core/Mage/Bundle/Model/Resource/Price/Index.php

-
message: "#^Variable \\$priceTypeCond might not be defined\\.$#"
count: 1
path: app/code/core/Mage/Bundle/Model/Resource/Price/Index.php

-
message: "#^Variable \\$valueIdCond might not be defined\\.$#"
count: 1
path: app/code/core/Mage/Bundle/Model/Resource/Price/Index.php

-
message: "#^Variable \\$_items might not be defined\\.$#"
count: 1
Expand Down Expand Up @@ -5315,16 +5295,6 @@ parameters:
count: 1
path: app/code/core/Mage/Catalog/Model/Resource/Url.php

-
message: "#^Variable \\$rootCategoryPath might not be defined\\.$#"
count: 1
path: app/code/core/Mage/Catalog/Model/Resource/Url.php

-
message: "#^Variable \\$rootCategoryPathLength might not be defined\\.$#"
count: 2
path: app/code/core/Mage/Catalog/Model/Resource/Url.php

-
message: "#^Call to function is_null\\(\\) with Mage_Catalog_Model_Resource_Url will always evaluate to false\\.$#"
count: 1
Expand Down Expand Up @@ -6300,11 +6270,6 @@ parameters:
count: 1
path: app/code/core/Mage/Checkout/Model/Type/Onepage.php

-
message: "#^Variable \\$customerRequest might not be defined\\.$#"
count: 2
path: app/code/core/Mage/Checkout/Model/Type/Onepage.php

-
message: "#^Comparison operation \"\\=\\=\" between 0\\|0\\.0\\|array\\|string\\|false\\|null and 0 results in an error\\.$#"
count: 1
Expand Down Expand Up @@ -11000,11 +10965,6 @@ parameters:
count: 2
path: app/code/core/Mage/Paypal/Model/Express/Checkout.php

-
message: "#^Variable \\$address might not be defined\\.$#"
count: 1
path: app/code/core/Mage/Paypal/Model/Express/Checkout.php

-
message: "#^Variable \\$shippingAddress might not be defined\\.$#"
count: 1
Expand Down Expand Up @@ -13010,16 +12970,6 @@ parameters:
count: 1
path: app/code/core/Mage/Sales/Model/Order/Pdf/Abstract.php

-
message: "#^Variable \\$shippingAddress might not be defined\\.$#"
count: 1
path: app/code/core/Mage/Sales/Model/Order/Pdf/Abstract.php

-
message: "#^Variable \\$shippingMethod might not be defined\\.$#"
count: 1
path: app/code/core/Mage/Sales/Model/Order/Pdf/Abstract.php

-
message: "#^Parameter \\#1 \\$object of method Mage_Sales_Model_Order_Pdf_Abstract\\:\\:_setFontBold\\(\\) expects Zend_Pdf_Page, Zend_Pdf_Style given\\.$#"
count: 1
Expand Down Expand Up @@ -15580,11 +15530,6 @@ parameters:
count: 1
path: get.php

-
message: "#^Variable \\$relativeFilename might not be defined\\.$#"
count: 4
path: get.php

-
message: "#^Comparison operation \"\\>\\=\" between int\\<0, max\\> and 0 is always true\\.$#"
count: 1
Expand Down Expand Up @@ -16167,7 +16112,7 @@ parameters:

-
message: "#^Variable \\$result might not be defined\\.$#"
count: 4
count: 3
path: lib/Varien/Db/Adapter/Pdo/Mysql.php

-
Expand Down Expand Up @@ -16597,7 +16542,7 @@ parameters:

-
message: "#^Cannot call method hasData\\(\\) on array\\|\\(callable\\)\\|object\\.$#"
count: 2
count: 1
path: lib/Varien/Object/Mapper.php

-
Expand Down

0 comments on commit 5e695d2

Please sign in to comment.