From 5036c9caabb12f90b9533d7fb417610e02a652ff Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 4 Jun 2012 15:34:56 +0300 Subject: Revert/optimize some changes from 773ccc318f2769c9b7579630569b5d8ba47b114b and d261b1e89c3d4d5191036d5a5660ef6764e593a0 --- system/libraries/Image_lib.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'system/libraries/Image_lib.php') diff --git a/system/libraries/Image_lib.php b/system/libraries/Image_lib.php index c3973a02f..4735dfd08 100644 --- a/system/libraries/Image_lib.php +++ b/system/libraries/Image_lib.php @@ -610,8 +610,8 @@ class CI_Image_lib { } // Set the x/y coordinates - $this->x_axis = ($this->x_axis === '' OR ! preg_match('/^[0-9]+$/', $this->x_axis)) ? 0 : $this->x_axis; - $this->y_axis = ($this->y_axis === '' OR ! preg_match('/^[0-9]+$/', $this->y_axis)) ? 0 : $this->y_axis; + is_numeric($this->x_axis) OR $this->x_axis = 0; + is_numeric($this->y_axis) OR $this->y_axis = 0; // Watermark-related Stuff... if ($this->wm_overlay_path !== '') @@ -750,7 +750,7 @@ class CI_Image_lib { if ($this->gd_version() !== FALSE) { $gd_version = str_replace('0', '', $this->gd_version()); - $v2_override = ($gd_version === 2) ? TRUE : FALSE; + $v2_override = ($gd_version === 2); } } else -- cgit v1.2.3-24-g4f1b