Fixing bugs found by static analysis
This commit is contained in:
+5
-5
@@ -237,16 +237,16 @@ function rgb2hsl($arr) {
|
||||
} else {
|
||||
$s = $del_Max / $var_Max;
|
||||
|
||||
$del_R = ((($max - $var_R ) / 6 ) + ($del_Max / 2 ) ) / $del_Max;
|
||||
$del_G = ((($max - $var_G ) / 6 ) + ($del_Max / 2 ) ) / $del_Max;
|
||||
$del_B = ((($max - $var_B ) / 6 ) + ($del_Max / 2 ) ) / $del_Max;
|
||||
$del_R = ((($var_Max - $var_R ) / 6 ) + ($del_Max / 2 ) ) / $del_Max;
|
||||
$del_G = ((($var_Max - $var_G ) / 6 ) + ($del_Max / 2 ) ) / $del_Max;
|
||||
$del_B = ((($var_Max - $var_B ) / 6 ) + ($del_Max / 2 ) ) / $del_Max;
|
||||
|
||||
if ($var_R == $var_Max) $h = $del_B - $del_G;
|
||||
else if ($var_G == $var_Max) $h = (1 / 3 ) + $del_R - $del_B;
|
||||
else if ($var_B == $var_Max) $h = (2 / 3 ) + $del_G - $del_R;
|
||||
|
||||
if ($H < 0) $h++;
|
||||
if ($H > 1) $h--;
|
||||
if ($h < 0) $h++;
|
||||
if ($h > 1) $h--;
|
||||
}
|
||||
|
||||
return array($h, $s, $v);
|
||||
|
||||
@@ -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.' ';}
|
||||
|
||||
@@ -334,7 +334,7 @@
|
||||
}
|
||||
|
||||
$pluginhost = new PluginHost();
|
||||
$pluginhost->set_debug($debug_enabled, $debug_enabled);
|
||||
$pluginhost->set_debug($debug_enabled);
|
||||
$user_plugins = get_pref("_ENABLED_PLUGINS", $owner_uid);
|
||||
|
||||
$pluginhost->load(PLUGINS, PluginHost::KIND_ALL);
|
||||
@@ -411,7 +411,7 @@
|
||||
|
||||
_debug("checking favicon...", $debug_enabled);
|
||||
|
||||
check_feed_favicon($site_url, $feed, $link);
|
||||
check_feed_favicon($site_url, $feed);
|
||||
$favicon_modified_new = @filemtime($favicon_file);
|
||||
|
||||
if ($favicon_modified_new > $favicon_modified)
|
||||
|
||||
Reference in New Issue
Block a user