Skip to content
Snippets Groups Projects
Verified Commit 7afb8b28 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3358581 by pfrenssen, _tarik_, a.dmitriiev, smustgrave, longwave,...

Issue #3358581 by pfrenssen, _tarik_, a.dmitriiev, smustgrave, longwave, larowlan: Deprecated function: array_slice(): Passing null to parameter #2 ($offset) of type int is deprecated in Drupal\Core\Config\Entity\Query\Query->execute()

(cherry picked from commit 6227621d)
parent cdce4ebf
No related branches found
No related tags found
8 merge requests!8376Drupal views: adding more granularity to the ‘use ajax’ functionality,!8300Issue #3443586 View area displays even when parent view has no results.,!7567Issue #3153723 by quietone, Hardik_Patel_12: Change the scaffolding...,!7565Issue #3153723 by quietone, Hardik_Patel_12: Change the scaffolding...,!7509Change label "Block description" to "Block type",!7344Issue #3292350 by O'Briat, KlemenDEV, hswong3i, smustgrave, quietone: Update...,!6922Issue #3412959 by quietone, smustgrave, longwave: Fix 12 'un' words,!6848Issue #3417553 by longwave: Remove withConsecutive() in CacheCollectorTest
Pipeline #106706 passed
Pipeline: drupal

#106761

    Pipeline: drupal

    #106756

      Pipeline: drupal

      #106750

        +6
        ......@@ -193,8 +193,8 @@ public function notExists($property, $langcode = NULL) {
        * {@inheritdoc}
        */
        public function range($start = NULL, $length = NULL) {
        $this->range = [
        'start' => $start,
        $this->range = is_null($start) && is_null($length) ? [] : [
        'start' => $start ?? 0,
        'length' => $length,
        ];
        return $this;
        ......
        ......@@ -499,6 +499,40 @@ public function testSortRange() {
        ->execute();
        $this->assertSame(['1', '2', '3'], array_values($this->queryResults));
        // Omit optional parameters for the range and sort.
        $this->queryResults = $this->entityStorage->getQuery()
        ->range()
        ->sort('id')
        ->execute();
        $this->assertSame(['1', '2', '3', '4', '5', '6', '7'], array_values($this->queryResults));
        // Explicitly pass NULL for the range and sort.
        $this->queryResults = $this->entityStorage->getQuery()
        ->range(NULL, NULL)
        ->sort('id')
        ->execute();
        $this->assertSame(['1', '2', '3', '4', '5', '6', '7'], array_values($this->queryResults));
        // Omit the optional start parameter for the range.
        $this->queryResults = $this->entityStorage->getQuery()
        ->range(NULL, 1)
        ->sort('id')
        ->execute();
        $this->assertSame(['1'], array_values($this->queryResults));
        // Omit the optional length parameter for the range.
        $this->queryResults = $this->entityStorage->getQuery()
        ->range(4)
        ->sort('id')
        ->execute();
        $this->assertSame(['5', '6', '7'], array_values($this->queryResults));
        // Request an empty range.
        $this->queryResults = $this->entityStorage->getQuery()
        ->range(0, 0)
        ->execute();
        $this->assertEmpty($this->queryResults);
        // Apply a pager with limit 4.
        $this->queryResults = $this->entityStorage->getQuery()
        ->pager('4', 0)
        ......
        0% Loading or .
        You are about to add 0 people to the discussion. Proceed with caution.
        Please register or to comment