Restore Fails

Restore Fails

by Eric Katchan -
Number of replies: 1

Hello, When trying to restore a course into a new on from backup,

scheduler tasks cause restore to die with fatal error.

Below, please find error

moodle 1.9x

postrgresql

apache

rh5.x

Scheduler "test"


Notice: Undefined index: SLOTS in /public/home/moodle/mod/scheduler/restorelib.php on line 124

Notice: Uninitialized string offset: 0 in /public/home/moodle/mod/scheduler/restorelib.php on line 195

Notice: Uninitialized string offset: 0 in /public/home/moodle/mod/scheduler/restorelib.php on line 199

Fatal error: Cannot use string offset as an array in /public/home/moodle/mod/scheduler/restorelib.php on line 205

Can anyone tell me where to start?

thanks

Eric

Average of ratings: -
In reply to Eric Katchan

Re: Restore Fails

by Brian King -
Hi,

it's probably a bit late to help you ... but for the next person having problems:

I saw this behaviour too. It seems to happen when you try to restore a course which has a scheduler instance, but no scheduled appointments.

Applying the attached patch file to mod/scheduler/restorelib.php allows the restore to succeed. It just checks that the thing that's expected to be an array really is before trying to process it.