From be6b2e61da065193642cd9561ad4f792c0dc816b Mon Sep 17 00:00:00 2001 From: "Igor Barkov (iwork)" Date: Fri, 3 Jul 2020 18:46:11 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D0=B4=D0=B5=D0=BB?= =?UTF-8?q?=D0=B0=D0=BD=20=D0=B7=D0=BD=D0=B0=D0=BA=20=D0=B7=D0=BE=D0=B4?= =?UTF-8?q?=D0=B8=D0=B0=D0=BA=D0=B0=20=D0=BD=D0=B0=20=D0=B1=D0=BE=D0=BB?= =?UTF-8?q?=D0=B5=D0=B5=20=D1=82=D0=BE=D1=87=D0=BD=D1=8B=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- functions.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/functions.php b/functions.php index 0ce816b..54dff47 100644 --- a/functions.php +++ b/functions.php @@ -2027,13 +2027,15 @@ function star_sign($date) $zodiac[51] = "12"; $zodiac[20] = "11"; $zodiac[0] = "10"; - $dayOfYear = date("z", $date); - $isLeapYear = date("L", $date); //Высокосный? + $dayOfYear = (int)date("z", $date); + $isLeapYear = (int)date("L", $date); //Высокосный? if ($isLeapYear && $dayOfYear >59) { - $dayOfYear = $dayOfYear - 1; + --$dayOfYear; } foreach ($zodiac as $day => $sign) { - if ($dayOfYear > $day) break; + if ($dayOfYear > $day) { + break; + } } return $sign; }