Enabling Dynamic Cache after a Drupal first installation $GLOBALS['conf']['cache'] is null

In my opinion the code:

function dynamic_cache_should_run() {
  // If the CURRENT cache setting is TRUE there is no reason to hijack or to
  // do any of the other checks that follow.
  if ($GLOBALS['conf']['cache']) {
    return FALSE;
  }

should be:

function dynamic_cache_should_run() {
  // If the CURRENT cache setting is TRUE there is no reason to hijack or to
  // do any of the other checks that follow.
  if (isset($GLOBALS['conf']['cache']) && $GLOBALS['conf']['cache'] == TRUE) {
    return FALSE;
  }

Let me know if this is correct and I'll make a patch.

CommentFileSizeAuthor
#3 2561847.patch464 bytesdjdevin
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pietrocap created an issue. See original summary.

gnpgio’s picture

Right! Perfect!
I had a problem with an error at line 42 of file dynamic_cache_module . The module "Eu Cookie law" did not work but thanks to this change now it works!

Thank you so much!

djdevin’s picture

Status: Active » Needs review
FileSize
464 bytes