summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/Pagination.php2
-rw-r--r--system/libraries/Typography.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/system/libraries/Pagination.php b/system/libraries/Pagination.php
index c59151bad..35ac541e8 100644
--- a/system/libraries/Pagination.php
+++ b/system/libraries/Pagination.php
@@ -128,7 +128,7 @@ class CI_Pagination {
}
// Calculate the total number of pages
- $num_pages = ceil($this->total_rows / $this->per_page);
+ $num_pages = (int) ceil($this->total_rows / $this->per_page);
// Is there only one page? Hm... nothing more to do here then.
if ($num_pages === 1)
diff --git a/system/libraries/Typography.php b/system/libraries/Typography.php
index 76f0d4fc5..46c73ef8b 100644
--- a/system/libraries/Typography.php
+++ b/system/libraries/Typography.php
@@ -144,7 +144,7 @@ class CI_Typography {
$process = TRUE;
$paragraph = FALSE;
- for ($i = 1, $c = count($chunks); $i <= $c; $i++)
+ for ($i = 0, $c = count($chunks) - 1; $i <= $c; $i++)
{
// Are we dealing with a tag? If so, we'll skip the processing for this cycle.
// Well also set the "process" flag which allows us to skip <pre> tags and a few other things.