From ee6f4b64a91d76070f930cdf7602ab4686714c7a Mon Sep 17 00:00:00 2001 From: VirtualTam Date: Fri, 6 Jan 2017 18:54:29 +0100 Subject: Cleanup: use safe boolean comparisons Signed-off-by: VirtualTam --- application/LinkUtils.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'application/LinkUtils.php') diff --git a/application/LinkUtils.php b/application/LinkUtils.php index cf58f808..976474de 100644 --- a/application/LinkUtils.php +++ b/application/LinkUtils.php @@ -89,7 +89,9 @@ function count_private($links) { $cpt = 0; foreach ($links as $link) { - $cpt = $link['private'] == true ? $cpt + 1 : $cpt; + if ($link['private']) { + $cpt += 1; + } } return $cpt; -- cgit v1.2.3