Доброго времени суток!
Ничего не предвещало проблем, как обычно установил обновление и тут началось... :о)
Fatal error: Call to a member function getConnection() on a non-object in ...
[CODE]namespace NSoft\Catalog;
class NGroupProducts extends \Bitrix\Main\Entity\Query {
function __construct($IBLOCK_ID, $SECTION_ID, $SITE_ID = false) {
$this->IBLOCK_ID = $IBLOCK_ID;
$this->SECTION_ID = strlen($SECTION_ID) > 0 ? $SECTION_ID : 'NULL';
$this->SITE_ID = $SITE_ID ? $SITE_ID : SITE_ID;
$this->join_props = array();
$this->join_catalog = false;
$this->join_prices = array();
parent::__construct(\Bitrix\Iblock\ElementTable::getEntity());
}
function setSelect($arSelect) {
$arSelect = $this->mapSelectProperties($arSelect);
return parent::setSelect($arSelect);
}
function setFilter($arFilter) {
$arFilter = $this->mapFilterProperties($arFilter);
return parent::setFilter($arFilter);
}
function setGroup($arGroup) {
$arGroup = $this->mapGroupProperties($arGroup);
return parent::setGroup($arGroup);
}
function setOrder($arOrder) {
$arOrder = $this->mapSortProperties($arOrder);
return parent::setOrder($arOrder);
}
function setNavParams($arNav) {
$this->arNavParams = $arNav;
}
public function addOrder($definition, $order = 'ASC')
{
$nulls_last = false;
$order = strtoupper($order);
$t_order = explode(',',$order);
if(count($t_order) > 1) {
foreach($t_order as $key => $o) {
if($o == 'NULLS') {
$nulls_last = ($key != 0);
} else {
$order = $o;
}
}
}
if($definition == 'RAND') {
$this->order['RAND'] = 'RAND('.rand(0,100000).')';
return $this;
}
if (!in_array($order, array('ASC', 'DESC'), true)) {
throw new Main\ArgumentException(sprintf('Invalid order "%s"', $order));
}
$connection = $this->init_entity->getConnection();
$helper = $connection->getSqlHelper();
....
[/CODE]
Помогите разобраться с проблемой.