Fix CI_Calendar::generate() not accepting NULLs (introduced in d261b1e89c3d4d5191036d5a5660ef6764e593a0)
diff --git a/system/libraries/Calendar.php b/system/libraries/Calendar.php
index 969a761..a49f171 100644
--- a/system/libraries/Calendar.php
+++ b/system/libraries/Calendar.php
@@ -155,7 +155,7 @@
public function generate($year = '', $month = '', $data = array())
{
// Set and validate the supplied month/year
- if ($year === '')
+ if (empty($year))
{
$year = date('Y', $this->local_time);
}
@@ -168,7 +168,7 @@
$year = '20'.$year;
}
- if ($month === '')
+ if (empty($month))
{
$month = date('m', $this->local_time);
}