Skip to content
Snippets Groups Projects
Commit c862b5f6 authored by Alex Barth's avatar Alex Barth
Browse files

Fix notices in tests.

parent d8b4db63
No related branches found
Tags 6.x-1.0-alpha11
No related merge requests found
...@@ -447,9 +447,10 @@ class FeedsDateTime extends DateTime { ...@@ -447,9 +447,10 @@ class FeedsDateTime extends DateTime {
protected function setGranularityFromTime($time, $tz) { protected function setGranularityFromTime($time, $tz) {
$this->granularity = array(); $this->granularity = array();
$temp = date_parse($time); $temp = date_parse($time);
// This PHP method currently doesn't have resolution down to seconds, so if there is some time, all will be set. // This PHP method currently doesn't have resolution down to seconds, so if
// there is some time, all will be set.
foreach (self::$allgranularity AS $g) { foreach (self::$allgranularity AS $g) {
if (is_numeric($temp[$g]) || ($g == 'zone' && $temp['zone_type'] > 0)) { if ((isset($temp[$g]) && is_numeric($temp[$g])) || ($g == 'zone' && (isset($temp['zone_type']) && $temp['zone_type'] > 0))) {
$this->granularity[] = $g; $this->granularity[] = $g;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment