diff --git a/src/SAML2/XML/ExtensionsTrait.php b/src/SAML2/XML/ExtensionsTrait.php
index <HASH>..<HASH> 100644
--- a/src/SAML2/XML/ExtensionsTrait.php
+++ b/src/SAML2/XML/ExtensionsTrait.php
@@ -80,12 +80,15 @@ trait ExtensionsTrait
             return true;
         }
 
-        $empty = false;
+        $empty = true;
         foreach ($this->extensions as $extension) {
-            $empty &= $extension->isEmptyElement();
+            if ($empty === false) {
+                break;
+            }
+            $empty = $empty && $extension->isEmptyElement();
         }
 
-        return boolval($empty);
+        return $empty;
     }
Bugfix: bitwise AND no longer works on booleans & strict_tyes=1