From 75db0cfa371941cbd7743d0523bbe3460688fc37 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 28 Nov 2017 13:12:12 +0200 Subject: [ci skip] Merge pull request #5342 from aanbar/pagination-bc-fix Preserve attributes from pagination config files Related: #4454 --- system/libraries/Pagination.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'system/libraries') diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php index f26f8a4ed..ece4edac9 100644 --- a/system/libraries/Pagination.php +++ b/system/libraries/Pagination.php @@ -339,6 +339,8 @@ class CI_Pagination { } } + // Enable rel attribute by default + isset($params['attributes']) OR $params['attributes'] = array(); $this->initialize($params); log_message('info', 'Pagination Class Initialized'); } @@ -353,8 +355,7 @@ class CI_Pagination { */ public function initialize(array $params = array()) { - isset($params['attributes']) OR $params['attributes'] = array(); - if (is_array($params['attributes'])) + if (isset($params['attributes']) && is_array($params['attributes'])) { $this->_parse_attributes($params['attributes']); unset($params['attributes']); -- cgit v1.2.3-24-g4f1b