Unverified Commit 8a41b704 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3051889 by idebr, joachim: $sandbox['max'] count in docs for hook_update_N() is incorrect

(cherry picked from commit d948f9cb)
parent c35a821e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -637,7 +637,7 @@ function hook_update_N(&$sandbox) {
    // This must be the first run. Initialize the sandbox.
    $sandbox['progress'] = 0;
    $sandbox['current_pk'] = 0;
    $sandbox['max'] = Database::getConnection()->query('SELECT COUNT(myprimarykey) FROM {mytable1}')->fetchField() - 1;
    $sandbox['max'] = Database::getConnection()->query('SELECT COUNT(myprimarykey) FROM {mytable1}')->fetchField();
  }

  // Update in chunks of 20.