Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean Baptiste Noblot <noblot.jb@gmail.com>2020-03-04 19:04:07 +0300
committerGitHub <noreply@github.com>2020-03-04 19:04:07 +0300
commitff2296329e5a702f1513c7c356d86dbf2965c706 (patch)
treea96181c1531b696a0f5d555649a08935585800cd /core/Date.php
parentcac7b9c0ba492c6c349fb502c1025c09bdcc22bb (diff)
Fix void return used and "improve" isLeap in Date (#15662)
* let's PHP say is leap or not * try to return a void function
Diffstat (limited to 'core/Date.php')
-rw-r--r--core/Date.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/Date.php b/core/Date.php
index b436d91e1a..cc45fb98db 100644
--- a/core/Date.php
+++ b/core/Date.php
@@ -442,9 +442,9 @@ class Date
*/
public function isLeapYear()
{
- $currentYear = date('Y', $this->getTimestamp());
+ $isLeap = (bool)(date('L', $this->getTimestamp()));
- return ($currentYear % 400) == 0 || (($currentYear % 4) == 0 && ($currentYear % 100) != 0);
+ return $isLeap;
}
/**