fixing a warning

This commit is contained in:
toyomoyo
2007-11-06 02:58:28 +00:00
parent 4e3dad540c
commit 0cd2561466
+1 -1
View File
@@ -135,7 +135,7 @@ function SCORMapi1_2() {
if (substr($element,0,14) == 'cmi.objectives') {
preg_match('/\.(\d+)\./',$element,$matches);
$element = preg_replace('/\.(\d+)\./',".\$1.",$element);
if ($matches[1] == $count) {
if (isset($matches[1]) && $matches[1] == $count) {
$count++;
$end = strpos($element,$matches[1])+strlen($matches[1]);
$subelement = substr($element,0,$end);