Skip to content

Commit 9645711

Browse files
committed
Move assert
1 parent f7d93bc commit 9645711

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/SAML2/XML/fed/SecurityTokenServiceType.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ public function __construct(\DOMElement $xml = null)
4646
*/
4747
public function toXML(\DOMElement $parent)
4848
{
49-
assert(is_string($this->Location));
50-
5149
if (is_null($this->Location)) {
5250
throw new \Exception('Location not set');
5351
}
5452

53+
assert(is_string($this->Location));
54+
5555
$e = parent::toXML($parent);
5656
$e->setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:fed', Constants::NS_FED);
5757
$e->setAttributeNS(\SAML2\Constants::NS_XSI, 'xsi:type', 'fed:SecurityTokenServiceType');

0 commit comments

Comments
 (0)