SearchKit - Fix search display pager when using default pager settings
authorColeman Watts <coleman@civicrm.org>
Wed, 15 Sep 2021 22:04:24 +0000 (18:04 -0400)
committerColeman Watts <coleman@civicrm.org>
Wed, 15 Sep 2021 22:04:24 +0000 (18:04 -0400)
ext/search_kit/Civi/Api4/Action/SearchDisplay/Run.php

index ce4a06d7a0736d9de97a53046a5e5d5136aae522..3ba06edbd3fb770288e116ca47cfd7f2f666f242 100644 (file)
@@ -45,7 +45,7 @@ class Run extends AbstractRunAction {
         break;
 
       default:
-        if (!empty($settings['pager']) && preg_match('/^page:\d+$/', $this->return)) {
+        if (($settings['pager'] ?? FALSE) !== FALSE && preg_match('/^page:\d+$/', $this->return)) {
           $page = explode(':', $this->return)[1];
         }
         $limit = !empty($settings['pager']['expose_limit']) && $this->limit ? $this->limit : NULL;