diff --git a/modules/saml/lib/Message.php b/modules/saml/lib/Message.php
index 42632885e8da05f5b78e4000cfcb2ebd04579cf7..0d5ab93e7da2de7e77d6375ac3413b306b75c875 100644
--- a/modules/saml/lib/Message.php
+++ b/modules/saml/lib/Message.php
@@ -818,12 +818,12 @@ class Message
             }
 
             $notBefore = $scd->getNotBefore();
-            if ($notBefore && $notBefore > time() + 60) {
+            if (is_int($notBefore) && $notBefore > time() + 60) {
                 $lastError = 'NotBefore in SubjectConfirmationData is in the future: '.$notBefore;
                 continue;
             }
             $notOnOrAfter = $scd->getNotOnOrAfter();
-            if ($notOnOrAfter && $notOnOrAfter <= time() - 60) {
+            if (is_int($notOnOrAfter) && $notOnOrAfter <= time() - 60) {
                 $lastError = 'NotOnOrAfter in SubjectConfirmationData is in the past: '.$notOnOrAfter;
                 continue;
             }