1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-18 22:51:28 +00:00

Fixing bugs found by static analysis

This commit is contained in:
Rasmus Lerdorf
2013-05-07 00:35:10 -07:00
parent 2c967d6023
commit 6f7798b643
27 changed files with 103 additions and 104 deletions

View File

@@ -1162,7 +1162,7 @@
$data = array_merge($data, getVirtCounters());
$data = array_merge($data, getLabelCounters());
$data = array_merge($data, getFeedCounters($active_feed));
$data = array_merge($data, getFeedCounters());
$data = array_merge($data, getCategoryCounters());
return $data;
@@ -1286,7 +1286,7 @@
return $unread;
} else if ($cat == -1) {
return getFeedUnread(-1) + getFeedUnread($link, -2) + getFeedUnread($link, -3) + getFeedUnread($link, 0);
return getFeedUnread(-1) + getFeedUnread(-2) + getFeedUnread(-3) + getFeedUnread(0);
} else if ($cat == -2) {
$result = db_query("
@@ -1726,7 +1726,8 @@
}
if (!$root_id) {
$is_selected = ($default_id == "CAT:0") ? "selected=\"1\"" : "";
$default_is_cat = ($default_id == "CAT:0");
$is_selected = $default_is_cat ? "selected=\"1\"" : "";
printf("<option $is_selected value='CAT:0'>%s</option>",
__("Uncategorized"));
@@ -4099,7 +4100,7 @@
preg_match("/(Location:|URI:)[^(\n)]*/", $header, $matches);
$url = trim(str_replace($matches[1],"",$matches[0]));
$url_parsed = parse_url($url);
return (isset($url_parsed))? geturl($url, $referer):'';
return (isset($url_parsed))? geturl($url):'';
}
$oline='';
foreach($status as $key=>$eline){$oline.='['.$key.']'.$eline.' ';}