ini_get('max_execution_time') returns 0 on my development system. (Don't ask me why.)

The issue is that the logic of _backup_migrate_check_timeout() is such, that no backups run if ini_get('max_execution_time') < variable_get('backup_migrate_timeout_buffer', 5).

So I made the code a little more robust.

I included a patch without whitespace changes, but that messes the indentation up a little. So I included the same patch with whitespace changes as well, for applying. (Is correct, but more confusing to read.)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

roderik’s picture

Moved one line around.

roderik’s picture

Correctly uploading stuff is an art form :p

JeremyFrench’s picture

That patch seems to contain a lot of fluff.
I just put

  if (ini_get('max_execution_time') == 0) {
    return false;
  }

at the top of _backup_migrate_check_timeout.

But this bug cost me an hour or so so would be nice to get fixed.

ronan’s picture

Status: Needs review » Fixed

Agreed. I like the simple solution. I think any non-zero value less than 5 seconds is unlikely enough that it doesn't really require a special case (and is probably too short for a db backup anyway).

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.