diff options
author | Stefan Giehl <stefan@piwik.org> | 2018-09-30 23:43:06 +0300 |
---|---|---|
committer | diosmosis <diosmosis@users.noreply.github.com> | 2018-09-30 23:43:06 +0300 |
commit | 019ce0114819d2a88a535fd0f122244ed3406bfa (patch) | |
tree | f7974f2419a52678e1a403b4ca0cb54b0daf140a /core | |
parent | 0e3702128ab244017339fcee5895b835f8b76de2 (diff) |
Fix various notices caused by invalid parameter values (#13511)
* Properly check dates used for period factory
* Properly check given idSite for rowevolution
* Improve example API to check given parameter type
* cast idSite parameter in ImageGraph API method
Diffstat (limited to 'core')
-rw-r--r-- | core/Period/Factory.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/Period/Factory.php b/core/Period/Factory.php index ee6fd3b7c9..5f7836dee0 100644 --- a/core/Period/Factory.php +++ b/core/Period/Factory.php @@ -80,7 +80,7 @@ abstract class Factory } $dateObject = Date::factory($date); - } else if (!empty($date)) { + } else if ($date instanceof Date) { $dateObject = $date; } else { throw new \Exception("Invalid date supplied to Period\Factory::build(): " . gettype($date)); |