Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1102428
D275.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Aug 19, 1:04 AM
Size
1 KB
Mime Type
text/x-diff
Expires
Wed, Aug 20, 1:04 AM (13 h, 1 m)
Engine
blob
Format
Raw Data
Handle
714175
Attached To
D275: INP-1661 - Check "CategoryHelper::getCategoryModule" method call result before using it
D275.diff
View Options
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
Log In to Comment