Skip to content
Permalink
Browse files

Improved error handling a bit.

  • Loading branch information...
defacer
defacer committed Jun 25, 2004
1 parent ca60b03 commit f184e8311f8c07d4994298dd881de0d311e3618f
Showing with 6 additions and 1 deletion.
  1. +6 −1 admin/blocks.php
@@ -105,7 +105,7 @@
/// Get and sort the existing blocks
if (!$blocks = get_records('blocks')) {
if (false === ($blocks = get_records('blocks'))) {
error('No blocks found!'); // Should never happen
}
@@ -117,6 +117,11 @@
$blockbyname[$blockobject->get_title()] = $block->id;
$blockobjects[$block->id] = $blockobject;
}
if(empty($blockbyname)) {
error('One or more blocks are registered in the database, but they all failed to load!');
}
ksort($blockbyname);
/// Print the table of all blocks

0 comments on commit f184e83

Please sign in to comment.
You can’t perform that action at this time.