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
132132 */
133133 public function getStart (): DateTime
134134 {
135+ if ($ this ->getContent () === null ) {
136+ throw new HandlingException ('Invalid content: The content of the Date Property is null. ' );
137+ }
135138 return $ this ->getContent ()->getStart ();
136139 }
137140
@@ -140,6 +143,9 @@ public function getStart(): DateTime
140143 */
141144 public function getEnd (): ?DateTime
142145 {
146+ if ($ this ->getContent () === null ) {
147+ return null ;
148+ }
143149 return $ this ->getContent ()->getEnd ();
144150 }
145151
@@ -148,6 +154,9 @@ public function getEnd(): ?DateTime
148154 */
149155 public function hasTime (): bool
150156 {
157+ if ($ this ->getContent () === null ) {
158+ return false ;
159+ }
151160 return $ this ->getContent ()->hasTime ();
152161 }
153162}
You can’t perform that action at this time.
0 commit comments