mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-61268 core: Fix empty string DB cehck
(amended by stronk7 to use the helper better)
This commit is contained in:
parent
8b4510c4cc
commit
03d174d733
@ -511,7 +511,7 @@ function upgrade_fix_block_instance_configuration() {
|
||||
|
||||
$sql = "SELECT *
|
||||
FROM {block_instances}
|
||||
WHERE configdata <> ''";
|
||||
WHERE " . $DB->sql_isnotempty('block_instances', 'configdata', true, true);
|
||||
$blockinstances = $DB->get_recordset_sql($sql);
|
||||
foreach ($blockinstances as $blockinstance) {
|
||||
$configdata = base64_decode($blockinstance->configdata);
|
||||
|
@ -27,6 +27,7 @@ defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
global $CFG;
|
||||
require_once($CFG->libdir.'/upgradelib.php');
|
||||
require_once($CFG->libdir.'/db/upgradelib.php');
|
||||
|
||||
/**
|
||||
* Tests various classes and functions in upgradelib.php library.
|
||||
|
Loading…
x
Reference in New Issue
Block a user