SEF and Invalid argument supplied
SEF and Invalid argument supplied
Hi! I'm update corepoll and find BUG
[quote]Warning: Invalid argument supplied for foreach() in /var/www/admin/data/www/politmarket.com/components/com_cjlib/framework/functions.php on line 3119[/quote]
IF SEF ON:
If SEF OFF:
Can you fix it?
[quote]Installed Version: 3.5.2
CoreJoomla Framework API Library Version: 2.0.14
[/quote]
This url work: http://politmarket.com/index.php?option=com_communitypolls&view=polls&task=viewpoll&id=20:testopros&Itemid=281
Thus url nowork: http://politmarket.com/polls/poll/20-testopros.html
[quote]Warning: Invalid argument supplied for foreach() in /var/www/admin/data/www/politmarket.com/components/com_cjlib/framework/functions.php on line 3119[/quote]
public static function get_categories_table_markup($categories, $options = array()){
$max_columns = isset($options['max_columns']) ? $options['max_columns'] : 3;
$max_children = isset($options['max_children']) ? $options['max_children'] : 0;
$base_url = isset($options['base_url']) ? $options['base_url'] : '';
$menu_id = isset($options['menu_id']) ? $options['menu_id'] : '';
$attribs = isset($options['link_attribs']) ? $options['link_attribs'] : array();
$stat_primary = isset($options['stat_primary']) ? $options['stat_primary'] : null;
$stat_secondary = isset($options['stat_secondary']) ? $options['stat_secondary'] : null;
$stat_tooltip = isset($options['stat_tooltip']) ? $options['stat_tooltip'] : null;
$num_rows = ceil(count($categories) / $max_columns);
$table = '<div class="row-fluid">';
$colspan = 'span'.(12/$max_columns);
$itemid = 0;
foreach($categories as $category){
if($itemid % $num_rows == 0) $table = $table.'<div class="'.$colspan.'">';
$url = JRoute::_($base_url.'&id='.$category['id'].':'.$category['alias'].$menu_id);
$title = CJFunctions::escape($category['title']);
if(!empty($stat_primary) && !empty($stat_secondary)){
$title = $title.' <span class="muted">('.$category[$stat_primary].'/'.$category[$stat_secondary].')</span>';
$attribs['title'] = !empty($stat_tooltip) ? JText::sprintf($stat_tooltip, $category['title'], $category[$stat_primary], $category[$stat_secondary]) : '';
$attribs['class'] = !empty($attribs['class']) ? $attribs['class'].' tooltip-hover' : 'tooltip-hover';
} else if(!empty($stat_primary)){
$title = $title.' <span class="muted">('.$category[$stat_primary].')</span>';
$attribs['title'] = !empty($stat_tooltip) ? JText::sprintf($stat_tooltip, $category['title'], $category[$stat_primary]) : '';
$attribs['class'] = !empty($attribs['class']) ? $attribs['class'].' tooltip-hover' : 'tooltip-hover';
}
$table = $table.'<ul class="unstyled no-space-left">';
$table = $table.'<li class="parent-item">'.JHtml::link($url, $title, $attribs).'</li>';
if($max_children > 0 && count($category['children']) > 0){
$child_count = 0;
foreach($category['children'] as $child){
$url = JRoute::_($base_url.'&id='.$child['id'].':'.$child['alias'].$menu_id);
$title = CJFunctions::escape($child['title']);
if(!empty($stat_primary) && !empty($stat_secondary)){
$title = $title.' ('.$child[$stat_primary].' / '.$child[$stat_secondary].')';
$attribs['title'] = !empty($stat_tooltip) ? JText::sprintf($stat_tooltip, $child['title'], $stat_primary, $stat_secondary) : '';
$attribs['class'] = !empty($attribs['class']) ? $attribs['class'].' tooltip-hover' : 'tooltip-hover';
} else if(!empty($stat_primary)){
$title = $title.' ('.$child[$stat_primary].')';
$attribs['title'] = !empty($stat_tooltip) ? JText::sprintf($stat_tooltip, $child['title'], $stat_primary) : '';
$attribs['class'] = !empty($attribs['class']) ? $attribs['class'].' tooltip-hover' : 'tooltip-hover';
}
$table = $table.'<li class="child-item">'.JHtml::link($url, $title, $attribs).'</li>';
if($child_count + 1 == $max_children) break;
$child_count++;
}
}
$table = $table.'</ul>';
if(($itemid % $num_rows == $num_rows - 1) || ($itemid + 1 == count($categories))) $table = $table.'</div>';
$itemid++;
}
$table = $table.'</div>';
return $table;
}
IF SEF ON:
If SEF OFF:
Can you fix it?
foreach($categories as $category){
[quote]Installed Version: 3.5.2
CoreJoomla Framework API Library Version: 2.0.14
[/quote]
This url work: http://politmarket.com/index.php?option=com_communitypolls&view=polls&task=viewpoll&id=20:testopros&Itemid=281
Thus url nowork: http://politmarket.com/polls/poll/20-testopros.html
Access to viewing replies is restricted.
Showing 8 of 8 replies
You do not have permissions for replying to this topic.