Commit d4f6c192 authored by kbahey's avatar kbahey

#372595 Clear APC should check if APC is enabled to prevent WSOD.

- Change all checks for APC to use the same function, for consistency
parent a0be4e64
......@@ -50,7 +50,7 @@ function performance_settings() {
1 => t('Enabled'),
);
if (function_exists('apc_store')) {
if (function_exists('apc_cache_info')) {
drupal_set_message(t('APC is enabled. It is reasonably safe to enable summary logging on live sites.'));
}
else {
......@@ -80,7 +80,7 @@ function performance_settings() {
);
$disabled = TRUE;
if (function_exists('apc_store')) {
if (function_exists('apc_cache_info')) {
$disabled = FALSE;
}
......@@ -171,7 +171,7 @@ function performance_shutdown() {
}
if (variable_get('performance_summary_apc', 0)) {
if (function_exists('apc_store')) {
if (function_exists('apc_cache_info')) {
performance_log_summary_apc($params);
}
}
......@@ -491,6 +491,12 @@ function performance_clear_apc_confirm() {
}
function performance_clear_apc_confirm_submit($form_id, &$form) {
if (!function_exists('apc_cache_info')) {
drupal_set_message(t('APC is not enabled. Nothing to do ...'));
drupal_goto('admin/settings/performance');
return;
}
$list = performance_apc_list_all();
if (!count($list)) {
// Nothing stored yet
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment