diff --git a/src/applications/differential/storage/DifferentialDiff.php b/src/applications/differential/storage/DifferentialDiff.php index 747407ce75..f5cb91c56b 100644 --- a/src/applications/differential/storage/DifferentialDiff.php +++ b/src/applications/differential/storage/DifferentialDiff.php @@ -737,9 +737,10 @@ final class DifferentialDiff $prop->delete(); } - $viewstates = id(new DifferentialViewStateQuery()) + $viewstate_query = id(new DifferentialViewStateQuery()) ->setViewer($viewer) ->withObjectPHIDs(array($this->getPHID())); + $viewstates = new PhabricatorQueryIterator($viewstate_query); foreach ($viewstates as $viewstate) { $viewstate->delete(); } diff --git a/src/applications/differential/storage/DifferentialRevision.php b/src/applications/differential/storage/DifferentialRevision.php index 2ab9d59821..15cf219f7b 100644 --- a/src/applications/differential/storage/DifferentialRevision.php +++ b/src/applications/differential/storage/DifferentialRevision.php @@ -1033,9 +1033,10 @@ final class DifferentialRevision extends DifferentialDAO $dummy_path->getTableName(), $this->getID()); - $viewstates = id(new DifferentialViewStateQuery()) + $viewstate_query = id(new DifferentialViewStateQuery()) ->setViewer($viewer) ->withObjectPHIDs(array($this->getPHID())); + $viewstates = new PhabricatorQueryIterator($viewstate_query); foreach ($viewstates as $viewstate) { $viewstate->delete(); }