Skip to content

Commit

Permalink
Merge pull request #248 from drupalprojects/7.x-3.x-missing-bootswatc…
Browse files Browse the repository at this point in the history
…h-msg

Adding nicer message when bootswatch libs have gone away
  • Loading branch information
soniktrooth committed May 12, 2016
2 parents 4ac07a7 + ec0ddc2 commit 01f9453
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions includes/utils.inc
Original file line number Diff line number Diff line change
Expand Up @@ -272,10 +272,18 @@ function kalatheme_get_bootswatch_themes() {
$bootswatches = $data->themes;
}
}
else {
$error_msg = t('@error. If this persists please post an issue on the !link.', array('@error' => $bootswatch_info->error, '!link' => l('Kalatheme Github issue queue', 'https://github.com/drupalprojects/kalatheme/issues')));
drupal_set_message($error_msg, 'error');

// Make sure $bootswatches is an array to prevent further errors.
$bootswatches = array();
}
}
else {
$bootswatches = $bootswatches->data;
}

// For the default option
// add to the front
$default = new stdClass();
Expand Down

0 comments on commit 01f9453

Please sign in to comment.