Permalink
Browse files

Fix for bug 2628.

  • Loading branch information...
1 parent e9df755 commit ff67989728b1b57c6b3d549a267b29caba3d44f7 defacer committed Feb 23, 2005
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/blocklib.php
View
@@ -491,7 +491,7 @@ function blocks_execute_action($page, &$pageblocks, $blockaction, $instanceorid)
$newinstance->pageid = $page->get_id();
$newinstance->pagetype = $page->get_type();
$newinstance->position = $newpos;
- $newinstance->weight = $weight->nextfree;
+ $newinstance->weight = empty($weight->nextfree) ? 0 : $weight->nextfree;
$newinstance->visible = 1;
$newinstance->configdata = '';
insert_record('block_instance', $newinstance);

0 comments on commit ff67989

Please sign in to comment.