Skip to content
Snippets Groups Projects
Commit 1c736939 authored by Olav Morken's avatar Olav Morken
Browse files

Utilities::getDOMChildren: Validate parameter types.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2008 44740490-163a-0410-bde0-09ae8108e29a
parent 1049042b
No related branches found
No related tags found
No related merge requests found
...@@ -869,14 +869,15 @@ class SimpleSAML_Utilities { ...@@ -869,14 +869,15 @@ class SimpleSAML_Utilities {
* *
* This function accepts the same shortcuts for namespaces as the isDOMElementOfType function. * This function accepts the same shortcuts for namespaces as the isDOMElementOfType function.
* *
* @param $element The element we should look in. * @param DOMElement $element The element we should look in.
* @param $localName The name the element should have. * @param string $localName The name the element should have.
* @param $namespaceURI The namespace the element should have. * @param string $namespaceURI The namespace the element should have.
* @return Array with the matching elements in the order they are found. An empty array is * @return array Array with the matching elements in the order they are found. An empty array is
* returned if no elements match. * returned if no elements match.
*/ */
public static function getDOMChildren($element, $localName, $namespaceURI) { public static function getDOMChildren(DOMElement $element, $localName, $namespaceURI) {
assert('$element instanceof DOMElement'); assert('is_string($localName)');
assert('is_string($namespaceURI)');
$ret = array(); $ret = array();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment