]> git.mjollnir.org Git - moodle.git/commitdiff
fixing a warning
authortoyomoyo <toyomoyo>
Tue, 6 Nov 2007 02:59:48 +0000 (02:59 +0000)
committertoyomoyo <toyomoyo>
Tue, 6 Nov 2007 02:59:48 +0000 (02:59 +0000)
mod/scorm/datamodels/scorm_12.js.php

index 213de3884ab12a89667fcb4d68e3562027dd7018..3851062457bde4cbe9b91624c5ef875f90970e12 100644 (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);