Skip to content

Commit

Permalink
Handle passed in as NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
MegaphoneJon committed Sep 8, 2017
1 parent 4198dd0 commit 9fba69d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CRM/Utils/Date.php
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,10 @@ public static function getRange($startDate, $endDate) {
* start date, end date
*/
public static function getFromTo($relative, $from, $to, $fromTime = NULL, $toTime = '235959') {
if (empty($toTime)) {
$toTime = '235959';
}

if ($relative) {
list($term, $unit) = CRM_Utils_System::explode('.', $relative, 2);
$dateRange = self::relativeToAbsolute($term, $unit);
Expand Down

0 comments on commit 9fba69d

Please sign in to comment.