Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.9
-
Fix Version/s: 1.9.1
-
Component/s: Database activity module
-
Labels:None
-
Environment:1.9 moodle with a 8.2.4 postgres installed in a SUSE Linux Enterprise Server 10 SP1
-
Database:PostgreSQL
-
Affected Branches:MOODLE_19_STABLE
-
Fixed Branches:MOODLE_19_STABLE
Description
When importing a database preset, there is an SQL error by an uninitialized variable.
The error shows some like this:
ERROR: invalid input syntax for integer: ""
UPDATE mdl_data SET course .....defaultsortdir = '0',editany = '0',notification = '' WHERE id = 9
the error is in the notification variable.
For solve this we must modify the file /moodle/mod/data/lib.php
and put in the function: data_update_instance($data)
this code:
if (empty($data->notification)) {
$data->notification = 0;
}
before call the function:
if (! update_record('data', $data)) {
return false;
}
See you
Hi Antonio,
this has been fixed now in CVS, will be available in some hours (CVS access) or in next weekly release next Wednesday (http://download.moodle.org).
Anyway... I'm going to change that DB field to have a proper default = 0 to save possible future problems... I've created
MDL-14548to fix that definitively.Thanks for the complete report, Antonio! B-)
Ciao
MDL-14548to fix that definitively. Thanks for the complete report, Antonio! B-) Ciao