mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Merge branch 'MDL-55617' of https://github.com/NeillM/moodle
This commit is contained in:
commit
9f3ba5c425
@ -105,6 +105,12 @@ abstract class backup_controller_dbops extends backup_dbops {
|
||||
throw new backup_dbops_exception('backup_controller_dbops_nonexisting');
|
||||
}
|
||||
$controller = unserialize(base64_decode($controllerrec->controller));
|
||||
if (!is_object($controller)) {
|
||||
// The controller field of the table did not contain a serialized object.
|
||||
// It is made empty after it has been used successfully, it is likely that
|
||||
// the user has pressed the browser back button at some point.
|
||||
throw new backup_dbops_exception('backup_controller_dbops_loading_invalid_controller');
|
||||
}
|
||||
// Check checksum is ok. Sounds silly but it isn't ;-)
|
||||
if (!$controller->is_checksum_correct($controllerrec->checksum)) {
|
||||
throw new backup_dbops_exception('backup_controller_dbops_loading_checksum_mismatch');
|
||||
|
@ -95,6 +95,12 @@ abstract class restore_controller_dbops extends restore_dbops {
|
||||
throw new backup_dbops_exception('restore_controller_dbops_nonexisting');
|
||||
}
|
||||
$controller = unserialize(base64_decode($controllerrec->controller));
|
||||
if (!is_object($controller)) {
|
||||
// The controller field of the table did not contain a serialized object.
|
||||
// It is made empty after it has been used successfully, it is likely that
|
||||
// the user has pressed the browser back button at some point.
|
||||
throw new backup_dbops_exception('restore_controller_dbops_loading_invalid_controller');
|
||||
}
|
||||
// Check checksum is ok. Sounds silly but it isn't ;-)
|
||||
if (!$controller->is_checksum_correct($controllerrec->checksum)) {
|
||||
throw new backup_dbops_exception('restore_controller_dbops_loading_checksum_mismatch');
|
||||
|
Loading…
x
Reference in New Issue
Block a user