]> git.mjollnir.org Git - moodle.git/commitdiff
Prevent some debugging notices, cast to object before inserting. Merged from 19_STABLE
authorstronk7 <stronk7>
Mon, 31 Dec 2007 15:20:02 +0000 (15:20 +0000)
committerstronk7 <stronk7>
Mon, 31 Dec 2007 15:20:02 +0000 (15:20 +0000)
lib/datalib.php

index 2343a46c4bf2a9edab2edb5a6cdd5c4a848c917d..06450d9a9e4764de21027978291e458e6a4a2ad7 100644 (file)
@@ -1536,6 +1536,9 @@ function update_timezone_records($timezones) {
 
 /// Insert all the new stuff
     foreach ($timezones as $timezone) {
+        if (is_array($timezone)) {
+            $timezone = (object)$timezone;
+        }
         insert_record('timezone', $timezone);
     }
 }