Skip to content

Commit

Permalink
Added default return string to getParam() (#2893)
Browse files Browse the repository at this point in the history
  • Loading branch information
sreichel authored Jan 6, 2023
1 parent 8020ce0 commit d8a708d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,6 @@ public function getIsConfigured()
*/
public function getSelectedTabId()
{
return addslashes(htmlspecialchars($this->getRequest()->getParam('tab')));
return addslashes(htmlspecialchars($this->getRequest()->getParam('tab', '')));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public function _initReportAction($blocks)
$blocks = [$blocks];
}

$requestData = Mage::helper('adminhtml')->prepareFilterString($this->getRequest()->getParam('filter'));
$requestData = Mage::helper('adminhtml')->prepareFilterString($this->getRequest()->getParam('filter', ''));
$requestData = $this->_filterDates($requestData, ['from', 'to']);
$requestData['store_ids'] = $this->getRequest()->getParam('store_ids');
$params = new Varien_Object();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function _initReportAction($blocks)
$blocks = [$blocks];
}

$requestData = Mage::helper('adminhtml')->prepareFilterString($this->getRequest()->getParam('filter'));
$requestData = Mage::helper('adminhtml')->prepareFilterString($this->getRequest()->getParam('filter', ''));
$requestData = $this->_filterDates($requestData, ['from', 'to']);
$requestData['store_ids'] = $this->getRequest()->getParam('store_ids');
$params = new Varien_Object();
Expand Down
2 changes: 1 addition & 1 deletion app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ public function getCurrentDirection()
}

$directions = ['asc', 'desc'];
$dir = strtolower($this->getRequest()->getParam($this->getDirectionVarName()));
$dir = strtolower($this->getRequest()->getParam($this->getDirectionVarName(), ''));
if ($dir && in_array($dir, $directions)) {
if ($dir == $this->_direction) {
Mage::getSingleton('catalog/session')->unsSortDirection();
Expand Down

0 comments on commit d8a708d

Please sign in to comment.