[svn r12166] Fixed warning messages for empty array

skala
Yannick Warnier 18 years ago
parent 8de07bab70
commit 3e86bf9448
  1. 2
      main/newscorm/scormResource.class.php

@ -116,6 +116,7 @@ class scormResource {
default:
//if($first_item->type == XML_ELEMENT_NODE) this is already check prior to the call to this function
$children = $element->childNodes;
if(is_array($children)){
foreach($children as $child)
{
switch($child->nodeType)
@ -139,6 +140,7 @@ class scormResource {
break;
}
}
}
//$keep_href = '';
if($element->hasAttributes()){ //in some cases we get here with an empty attributes array
//TODO find when and why we get such a case (empty array)

Loading…
Cancel
Save