From 195c8a06013bb7552c79f95a2c76c9c7e4371a66 Mon Sep 17 00:00:00 2001 From: jekkos Date: Thu, 21 Jan 2016 16:23:54 +0100 Subject: [PATCH] Make docker work with 2.4 branch --- Dockerfile | 1 + system/libraries/Pagination.php | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 07aa6ddec..b1a667d67 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,6 +11,7 @@ RUN git clone https://github.com/jekkos/opensourcepos.git /app # RUN cd app && npm install RUN ln -fs /app/* /var/www +RUN rm /var/www/index.html ADD ./start_container.sh /start_container.sh RUN chmod 755 /start_container.sh EXPOSE 80 3306 diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php index e573d4285..9a0db9664 100644 --- a/system/libraries/Pagination.php +++ b/system/libraries/Pagination.php @@ -512,14 +512,16 @@ class CI_Pagination { { $this->cur_page = str_replace(array($this->prefix, $this->suffix), '', $this->cur_page); } - } + } else { + $this->cur_page = (string) $this->cur_page; + } // If something isn't quite right, back to the default base page. if ( ! ctype_digit($this->cur_page) OR ($this->use_page_numbers && (int) $this->cur_page === 0)) { $this->cur_page = $base_page; } - else + elseif (empty($this->cur_page)) { // Make sure we're using integers for comparisons later. $this->cur_page = (int) $this->cur_page;