[svn r12166] Fixed warning messages for empty array

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

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

Loading…
Cancel
Save