From b871436148c58cb99bd845a89fdd4e02cf1c4a63 Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Mon, 8 Nov 2010 03:28:54 +0000 Subject: [PATCH] MDL-25031 ignore invalid block instances pagetypepattern can not be null, so we ignore these until we find a way to fix them properly, sorry --- lib/db/upgrade.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index db18a39718e..b84d528c5b7 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -1855,7 +1855,9 @@ WHERE gradeitemid IS NOT NULL AND grademax IS NOT NULL"); CASE WHEN subpagepattern IS NULL THEN '' ELSE subpagepattern END, 0, defaultregion, defaultweight - FROM {block_instances} WHERE visible = 0 AND pagetypepattern <> 'admin-*'"); + FROM {block_instances} WHERE visible = 0 AND pagetypepattern <> 'admin-*' AND pagetypepattern IS NOT NULL"); + // note: MDL-25031 all block instances should have a pagetype pattern, NULL is not allowed, + // if we manage to find out how NULLs get there we should fix them before this step /// Main savepoint reached upgrade_main_savepoint(true, 2009050618);