Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent string * int multiplification issue in PHP 8.0+ #1915

Merged
merged 17 commits into from
May 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ protected function _getModelAttributeByEntityId($modelType, $attributeName, $ent
}
return $result;
}

/**
* Category Tree node onClick listener js function
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,7 @@ public function canReturnItemToStock($item=null) {
}
return $canReturnToStock;
}

/**
* Whether to show 'Return to stock' column for item parent
* @param Mage_Sales_Model_Order_Creditmemo_Item $item
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public function getLastOrder()

return false;
}

/**
* Retrieve item collection
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ protected function _prepareBatchModel()
$this->_batchModelPrepared = true;
return $this;
}

/**
* Return a batch model instance
* @return Mage_Dataflow_Model_Batch
Expand All @@ -114,6 +115,7 @@ protected function _getBatchModel()
{
return $this->_batchModel;
}

/**
* Return a batch model config JSON
* @return string
Expand All @@ -124,6 +126,7 @@ public function getBatchConfigJson()
$this->getBatchConfig()
);
}

/**
* Encoding to JSON
* @param string $source
Expand All @@ -133,6 +136,7 @@ public function jsonEncode($source)
{
return Mage::helper('core')->jsonEncode($source);
}

/**
* Get a profile
* @return object
Expand All @@ -141,6 +145,7 @@ public function getProfile()
{
return Mage::registry('current_convert_profile');
}

/**
* Generating form key
* @return string
Expand All @@ -149,6 +154,7 @@ public function getFormKey()
{
return Mage::getSingleton('core/session')->getFormKey();
}

/**
* Return batch model and initialize it if need
* @return Mage_Dataflow_Model_Batch
Expand All @@ -158,6 +164,7 @@ public function getBatchModel()
return $this->_prepareBatchModel()
->_getBatchModel();
}

/**
* Generating exceptions data
* @return array
Expand Down
1 change: 1 addition & 0 deletions app/code/core/Mage/Adminhtml/Block/Tag/Customer/Grid.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public function __construct()
$this->setDefaultDir('ASC');
$this->setUseAjax(true);
}

/*
* Retrieves Grid Url
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public function getValues()
}
return $this->_values;
}

/**
* Renders grid column
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public function getValues()
}
return $this->_values;
}

/**
* Renders grid column
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ protected function _initCategory($getRootInstead = false)
Mage::getSingleton('cms/wysiwyg_config')->setStoreId($this->getRequest()->getParam('store'));
return $category;
}

/**
* Catalog categories index action
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ protected function _initGroup()
}

}

/**
* Customer groups list.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ public function emailAction()
}
$this->_redirect('*/sales_order/view', array('order_id' => $order->getId()));
}

/**
* Cancel order
*/
Expand Down
4 changes: 4 additions & 0 deletions app/code/core/Mage/Backup/Model/Resource/Helper/Mysql4.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ public function getTableCreateScript($tableName, $addDropIfExists = false)

return $script;
}

/**
* Retrieve SQL fragment for create table
*
Expand Down Expand Up @@ -156,6 +157,7 @@ public function getTableCreateSql($tableName, $withForeignKeys = false)

return $sql . ';';
}

/**
* Returns SQL header data, move from original resource model
*
Expand Down Expand Up @@ -267,6 +269,7 @@ public function getPartInsertSql($tableName, $count = null, $offset = null)

return $sql;
}

/**
* Return table data SQL insert
*
Expand All @@ -277,6 +280,7 @@ public function getInsertSql($tableName)
{
return $this->getPartInsertSql($tableName);
}

/**
* Quote Table Row
*
Expand Down
36 changes: 32 additions & 4 deletions app/code/core/Mage/Bundle/Model/Price/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@
* @method Mage_Bundle_Model_Price_Index setWebsiteId(int $value)
* @method int getCustomerGroupId()
* @method Mage_Bundle_Model_Price_Index setCustomerGroupId(int $value)
* @method float getMinPrice()
* @method Mage_Bundle_Model_Price_Index setMinPrice(float $value)
* @method float getMaxPrice()
* @method Mage_Bundle_Model_Price_Index setMaxPrice(float $value)
*
* @category Mage
* @package Mage_Bundle
Expand Down Expand Up @@ -151,4 +147,36 @@ public function addPriceIndexToProduct($product)
}
return $this;
}

/**
* @return float
*/
public function getMinPrice()
{
return (float) $this->_getData('min_price');
}

/**
* @return float
*/
public function getMaxPrice()
{
return (float) $this->_getData('max_price');
}

/**
* @return $this
*/
public function setMinPrice($value)
{
return $this->setData('min_price', (float) $value);
}

/**
* @return $this
*/
public function setMaxPrice($value)
{
return $this->setData('max_price', (float) $value);
}
}
36 changes: 32 additions & 4 deletions app/code/core/Mage/Bundle/Model/Selection.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@
* @method int getSelectionId()
* @method int getSelectionPriceType()
* @method $this setSelectionPriceType(int $value)
* @method float getSelectionPriceValue()
* @method $this setSelectionPriceValue(float $value)
* @method float getSelectionQty()
* @method $this setSelectionQty(float $value)
* @method int getWebsiteId()
* @method $this setWebsiteId(int $value)
* @method $this unsSelectionPriceValue()
Expand Down Expand Up @@ -92,4 +88,36 @@ protected function _afterSave()
}
parent::_afterSave();
}

/**
* @return float
*/
public function getSelectionPriceValue()
{
return (float) $this->_getData('selection_price_value');
}

/**
* @return float
*/
public function getSelectionQty()
{
return (float) $this->_getData('selection_qty');
}

/**
* @return $this
*/
public function setSelectionPriceValue($value)
{
return $this->setData('selection_price_value', (float) $value);
}

/**
* @return $this
*/
public function setSelectionQty($value)
{
return $this->setData('selection_qty', (float) $value);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public function gridAction()
->toHtml()
);
}

/**
* Check for is allowed
*
Expand Down
1 change: 1 addition & 0 deletions app/code/core/Mage/Catalog/Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ public function getOldFieldMap()
}
return (array) $node;
}

/**
* Check if Minimum Advertised Price is enabled
*
Expand Down
Loading