Page MenuHomeIn-Portal Phabricator

D275.diff
No OneTemporary

File Metadata

Created
Mon, Jan 6, 7:23 AM

D275.diff

Index: branches/5.2.x/core/units/helpers/category_helper.php
===================================================================
--- branches/5.2.x/core/units/helpers/category_helper.php
+++ branches/5.2.x/core/units/helpers/category_helper.php
@@ -37,7 +37,7 @@
* @param array $params Tag params.
* @param array $category_path Category parent path.
*
- * @return array
+ * @return array|false
*/
public function getCategoryModule(array $params, array $category_path)
{
@@ -57,7 +57,7 @@
}
}
- return array();
+ return false;
}
/**
Index: branches/5.2.x/core/units/helpers/navigation_bar.php
===================================================================
--- branches/5.2.x/core/units/helpers/navigation_bar.php
+++ branches/5.2.x/core/units/helpers/navigation_bar.php
@@ -207,7 +207,7 @@
$category_helper = $this->Application->recallObject('CategoryHelper');
$module_info = $category_helper->getCategoryModule($this->_params, array_keys($category_path));
- $module_item_id = $this->Application->GetVar($module_info['Var'] . '_id');
+ $module_item_id = $module_info ? $this->Application->GetVar($module_info['Var'] . '_id') : false;
$ret = '';
$block_params = $this->_getBaseParams();

Event Timeline