0

In My Magento Project => System.log generates following Error

2014-06-28T12:34:58+00:00 ERR (3): Strict Notice: Only variables should be passed by reference  in
 D:\INETPUB\VHOSTS\DOMAINNAME\app\design\frontend\THEME\default\template\directory\currency-top.phtml on line 9

The Code at Line 9 is as follows :

$last_item = end(($this->getCurrencies()));

I referred this URL & this, But No Success

Community
  • 1
  • 1
LuFFy
  • 8,799
  • 10
  • 41
  • 59

2 Answers2

1

The problem is, that end requires a reference, because it modifies the internal representation of the array (i.e. it makes the current element pointer point to the last element).

Set into a variable the result of the "$this->getCurrencies()" function, and pass this variable to the end() function

Milthir
  • 36
  • 4
1

Hello Please try this one

$getCurrencies = $this->getCurrencies();

$last_item = end(($getCurrencies));