From 1c7369399746ab7d32faddfa71a3f807518d94a1 Mon Sep 17 00:00:00 2001 From: Olav Morken <olav.morken@uninett.no> Date: Thu, 26 Nov 2009 09:17:50 +0000 Subject: [PATCH] Utilities::getDOMChildren: Validate parameter types. git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2008 44740490-163a-0410-bde0-09ae8108e29a --- lib/SimpleSAML/Utilities.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/SimpleSAML/Utilities.php b/lib/SimpleSAML/Utilities.php index e270b0592..546d5d872 100644 --- a/lib/SimpleSAML/Utilities.php +++ b/lib/SimpleSAML/Utilities.php @@ -869,14 +869,15 @@ class SimpleSAML_Utilities { * * This function accepts the same shortcuts for namespaces as the isDOMElementOfType function. * - * @param $element The element we should look in. - * @param $localName The name the element should have. - * @param $namespaceURI The namespace the element should have. - * @return Array with the matching elements in the order they are found. An empty array is + * @param DOMElement $element The element we should look in. + * @param string $localName The name the element should have. + * @param string $namespaceURI The namespace the element should have. + * @return array Array with the matching elements in the order they are found. An empty array is * returned if no elements match. */ - public static function getDOMChildren($element, $localName, $namespaceURI) { - assert('$element instanceof DOMElement'); + public static function getDOMChildren(DOMElement $element, $localName, $namespaceURI) { + assert('is_string($localName)'); + assert('is_string($namespaceURI)'); $ret = array(); -- GitLab