summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Andrews2014-06-05 22:35:06 (GMT)
committerJeremy Andrews2014-06-05 22:35:06 (GMT)
commit9446b6cc53c57decbf57f69d099e2b361e2a5c23 (patch)
tree6d74ec9b0786451342f4cd2a93f2fa1362db4838
parent16d354d9df8a4240e2df4256ea5bb657ceea20b1 (diff)
Issue #2280219: handle misconfiguration without fatal error.
-rw-r--r--memcache.install11
1 files changed, 5 insertions, 6 deletions
diff --git a/memcache.install b/memcache.install
index 64024c6..ca8abd9 100644
--- a/memcache.install
+++ b/memcache.install
@@ -49,7 +49,7 @@ function memcache_enable() {
}
if ($error || $warning) {
- drupal_set_message($t('There are problems with your Memcache configuration. Please review %readme and visit the Drupal admin !status page for more information.', array('%readme' => 'README.txt', '!status' => l($t('status report'), 'admin/reports/status'))), $severity);
+ drupal_set_message(t('There are problems with your Memcache configuration. Please review %readme and visit the Drupal admin !status page for more information.', array('%readme' => 'README.txt', '!status' => l(t('status report'), 'admin/reports/status'))), $severity);
}
}
@@ -81,6 +81,7 @@ function memcache_requirements($phase) {
if (!function_exists('dmemcache_set')) {
// dmemcache.inc isn't loaded.
$errors[] = $t('Failed to load required file %dmemcache.', array('%dmemcache' => drupal_get_path('module', 'memcache') . '/' . 'dmemcache.inc'));
+ $requirements['memcache_extension']['value'] = $t('Unknown');
}
else {
$extension = dmemcache_extension();
@@ -92,12 +93,10 @@ function memcache_requirements($phase) {
$version = phpversion('memcached');
$recommended = MEMCACHED_PECL_RECOMMENDED;
}
- if ($version) {
- $requirements['memcache_extension']['value'] = $version . _memcache_statistics_link();
- }
- else {
- $version = $t('unknown');
+ if (!$version) {
+ $version = $t('Unknown');
}
+ $requirements['memcache_extension']['value'] = $version . _memcache_statistics_link();
if (!_memcache_version_valid()) {
$warnings[] = $t('PECL !extension version %version is unsupported. Please update to %recommended or newer.', array(