summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2012-01-12 18:04:10 +0100
committerPhil Sturgeon <email@philsturgeon.co.uk>2012-01-12 18:04:10 +0100
commitfc514ca3578c59753e059fd6b8a2415424850535 (patch)
treeca77060473bd78616ca157b8a674a1f420c8e015 /system
parent1e42cdc1d3b4c919e0e4dec6a2ce81c360e946af (diff)
parent8f80bc4f855f78efbcb6344ea29cf67647b6772b (diff)
Merge pull request #846 from aquariuz/develop
fixed 2 bugs
Diffstat (limited to 'system')
-rw-r--r--system/libraries/Image_lib.php2
-rw-r--r--system/libraries/Pagination.php2
-rw-r--r--system/libraries/Typography.php2
3 files changed, 3 insertions, 3 deletions
diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php
index dc7d362ce..a226ae8f8 100644
--- a/system/libraries/Image_lib.php
+++ b/system/libraries/Image_lib.php
@@ -1091,7 +1091,7 @@ class CI_Image_lib {
$txt_color = str_split(substr($this->wm_font_color, 1, 6), 2);
$txt_color = imagecolorclosest($src_img, hexdec($txt_color[0]), hexdec($txt_color[1]), hexdec($txt_color[2]));
$drp_color = str_split(substr($this->wm_shadow_color, 1, 6), 2);
- $drp_color = imagecolorclosest($src_img, hexdec($drp_color[0]), hexdec($drp_color[2]), hexdec($drp_color[3]));
+ $drp_color = imagecolorclosest($src_img, hexdec($drp_color[0]), hexdec($drp_color[1]), hexdec($drp_color[2]));
// Add the text to the source image
if ($this->wm_use_truetype)
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.