Предупреждение на странице товара

#
Предупреждение на странице товара
Здравствуйте на новых версиях php имею на странице товара ИМ такое предупреждение:
Предупреждение: Declaration of Shop_Controller_Show_Last_Items::xsl(Xsl_Model $oXsl) should be compatible with Core_Controller::xsl($xsl) в файле /home/users/.../modules/shop/controller/show/last/items.php (строка 353)Замечание: Only variables should be passed by reference в файле /home/users/.../modules/shop/controller/show/last/items.php (строка 116)
Строки о которых идет речь:
/**
    * Shop_Controller_Show_Last_Items::loadLastItems() - заполняет массив последних просмотренных товаров значениями из куки
    *
    * @return void
    */
   private function loadLastItems()
   {
      // загрузим массив просмотренных элементов из куки
        $this->_aShop_Last_Items = Core_Type_Conversion::toArray(@unserialize(Core_Array::get($_COOKIE, $this->_cookie_name, null)));
        $this->_aShop_Last_Items = array_unique($this->_aShop_Last_Items);
   }
а 353 это закрывающая скобка файла.

Как поправить это добро? Спасибо.
Модератор
#
Re: Предупреждение на странице товара
в Shop_Controller_Show_Last_Items при объявлении xsl() уберите из него упоминание Xsl_Model
пример см. в Core_Controller::xsl
#
Re: Предупреждение на странице товара
Спасибо. Убрал вот так:
/**
    * Shop_Controller_Show_Last_Items::xsl() - назначает XSL-шаблон для отображения
    *
    * @param mixed $oXsl
    * @return
    */
   public function xsl($oXsl)
   {
      $this->_oShop_Controller_Show->xsl($oXsl);
      return $this;
   }
осталось
Замечание:  Only variables should be passed by reference в файле /home/users/..../modules/shop/controller/show/last/items.php (строка 116)
Модератор
#
Re: Предупреждение на странице товара
antracit писал(а):
Замечание:  Only variables should be passed by reference в файле /home/users/..../modules/shop/controller/show/last/items.php (строка 116)

кто ж знает, что у вас там написано, приведите строку
#
Re: Предупреждение на странице товара
А она чуть выше есть
   private function loadLastItems()
   {
      // загрузим массив просмотренных элементов из куки
        $this->_aShop_Last_Items = Core_Type_Conversion::toArray(@unserialize(Core_Array::get($_COOKIE, $this->_cookie_name, null)));
        $this->_aShop_Last_Items = array_unique($this->_aShop_Last_Items);
   }
ругается конкретно на: $this->_aShop_Last_Items = Core_Type_Conversion::toArray(@unserialize(Core_Array::get($_COOKIE, $this->_cookie_name, null)));
Модератор
#
Re: Предупреждение на странице товара
в toArray можно передавать только переменную, а не результат функции.
private function loadLastItems()
{
   // загрузим массив просмотренных элементов из куки
   $fromCookie = @unserialize(Core_Array::get($_COOKIE, $this->_cookie_name, null));
   
   $this->_aShop_Last_Items = Core_Type_Conversion::toArray($fromCookie);
   $this->_aShop_Last_Items = array_unique($this->_aShop_Last_Items);
}
Авторизация