File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -132,6 +132,9 @@ public function isRange(): bool
132
132
*/
133
133
public function getStart (): DateTime
134
134
{
135
+ if ($ this ->getContent () === null ) {
136
+ throw new HandlingException ('Invalid content: The content of the Date Property is null. ' );
137
+ }
135
138
return $ this ->getContent ()->getStart ();
136
139
}
137
140
@@ -140,6 +143,9 @@ public function getStart(): DateTime
140
143
*/
141
144
public function getEnd (): ?DateTime
142
145
{
146
+ if ($ this ->getContent () === null ) {
147
+ return null ;
148
+ }
143
149
return $ this ->getContent ()->getEnd ();
144
150
}
145
151
@@ -148,6 +154,9 @@ public function getEnd(): ?DateTime
148
154
*/
149
155
public function hasTime (): bool
150
156
{
157
+ if ($ this ->getContent () === null ) {
158
+ return false ;
159
+ }
151
160
return $ this ->getContent ()->hasTime ();
152
161
}
153
162
}
You can’t perform that action at this time.
0 commit comments