Skip to content

Commit 01f9453

Browse files
committed
Merge pull request #248 from drupalprojects/7.x-3.x-missing-bootswatch-msg
Adding nicer message when bootswatch libs have gone away
2 parents 4ac07a7 + ec0ddc2 commit 01f9453

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

includes/utils.inc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,10 +272,18 @@ function kalatheme_get_bootswatch_themes() {
272272
$bootswatches = $data->themes;
273273
}
274274
}
275+
else {
276+
$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')));
277+
drupal_set_message($error_msg, 'error');
278+
279+
// Make sure $bootswatches is an array to prevent further errors.
280+
$bootswatches = array();
281+
}
275282
}
276283
else {
277284
$bootswatches = $bootswatches->data;
278285
}
286+
279287
// For the default option
280288
// add to the front
281289
$default = new stdClass();

0 commit comments

Comments
 (0)