Skip to content
Open
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
Fix an "only variables should be passed by reference" PHP notice
The array_walk function accepts the array parameter as reference. That
parameter is being passed directly from the method return however only
variables can be passed as reference.
  • Loading branch information
rvelhote committed Sep 5, 2018
commit af64433aa3ca33d3c63ab4ac28ef8e8a9c1d8e66
3 changes: 2 additions & 1 deletion app/code/community/Ebanx/Gateway/Block/Health/Check.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ public function hasAnySupportedCurrency()
$this->supportedCurrencies = Currency::all();

try {
array_walk(Mage::app()->getStores(), function ($store) {
$stores = Mage::app()->getStores();
array_walk($stores, function ($store) {
if (in_array(Mage::app()->getStore($store->store_id)->getCurrentCurrencyCode(), $this->supportedCurrencies)) {
throw new Exception;
}
Expand Down