Commit 4f15ce32 authored by Eric Alvares's avatar Eric Alvares Committed by Adrian Cid Almaguer
Browse files

Issue #3320816 by Eric_A, cleversonr, adriancid: Error with...

Issue #3320816 by Eric_A, cleversonr, adriancid: Error with node_revision_delete when node_revision_delete_cron is NULL
parent 774fdcb5
Loading
Loading
Loading
Loading
+4 −0
Changes for node_revision_delete.module: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -304,6 +304,10 @@ function node_revision_delete_cron() {
  if ($period >= 0 && ($current_time - $last_execute > $period)) {
    // Getting the the maximum number of revisions to process.
    $revisions_to_process = $config->get('node_revision_delete_cron');
    // Do nothing if node_revision_delete_cron is NULL.
    if (!isset($revisions_to_process)) {
      return;
    }
    // Getting the revisions to delete.
    $revisions = \Drupal::service('node_revision_delete')->getCandidatesRevisionsByNumber($revisions_to_process);
    // Checking if we have revisions to delete.