From e329fd34c28ada594782d1d636b59b8af574379a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Hojtsy?= Date: Wed, 7 Nov 2007 21:13:31 +0000 Subject: #190128 by bjaspan and chx: fix _block_rehash() functionality on PostgreSQL --- modules/block/block.module | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/block/block.module b/modules/block/block.module index 10b0c233f..53d6974c6 100644 --- a/modules/block/block.module +++ b/modules/block/block.module @@ -240,6 +240,12 @@ function _block_rehash() { $block['module'] = $module; $block['delta'] = $delta; $block['theme'] = $theme_key; + if (!isset($block['pages'])) { + // {block}.pages is type 'text', so it cannot have a + // default value, and not null, so we need to provide + // value if the module did not. + $block['pages'] = ''; + } // Add defaults and save it into the database. drupal_write_record('blocks', $block); $blocks[] = $block; -- cgit v1.2.3