Index: trunk/kernel/include/category.php =================================================================== diff -u -r1215 -r1348 --- trunk/kernel/include/category.php (.../category.php) (revision 1215) +++ trunk/kernel/include/category.php (.../category.php) (revision 1348) @@ -741,7 +741,8 @@ function ParseObject($element) { - global $objConfig, $objCatList, $rootURL, $var_list, $var_list_update, $m_var_list_update, $objItemTypes,$objCountCache; + global $objConfig, $objCatList, $rootURL, $var_list, $var_list_update, $m_var_list_update, $objItemTypes,$objCountCache, $objUsers; + $extra_attribs = ExtraAttributes($element->attributes); //print_r($element); @@ -861,8 +862,19 @@ { $field = "user_login"; } - $u = $objUsers->GetUser($this->Get("CreatedById")); - $ret = $u->parsetag($field); + + $userId = $this->Get("CreatedById"); + if (!empty($userId) && ($userId > 0)) + { + $u =& $objUsers->GetItem($userId); + if (is_object($u)) + { + $ret = $u->parsetag($field); + } + } + else + $ret = " "; + break; case "custom": /* @@ -1600,7 +1612,7 @@ if($no_limit == false) { $this->FixInvalidPage($fix_method); - $Start = ($this->Page-1) * $PerPage; + $Start = !empty($this->Page)? (($this->Page-1) * $PerPage) : 0; $limit = "LIMIT ".$Start.",".$PerPage; } else