diff options
Diffstat (limited to 'system')
-rw-r--r-- | system/helpers/request.php | 1 | ||||
-rw-r--r-- | system/libraries/ORM.php | 6 | ||||
-rw-r--r-- | system/libraries/drivers/Image/ImageMagick.php | 2 |
3 files changed, 7 insertions, 2 deletions
diff --git a/system/helpers/request.php b/system/helpers/request.php index 2cc59b20..c04a2fa2 100644 --- a/system/helpers/request.php +++ b/system/helpers/request.php @@ -123,6 +123,7 @@ class request_Core { if ( ! is_array(request::$user_agent)) { + request::$user_agent = array(); request::$user_agent['agent'] = isset($_SERVER['HTTP_USER_AGENT']) ? trim($_SERVER['HTTP_USER_AGENT']) : ''; // Parse the user agent and extract basic information diff --git a/system/libraries/ORM.php b/system/libraries/ORM.php index 4dd2eaf0..eb34221c 100644 --- a/system/libraries/ORM.php +++ b/system/libraries/ORM.php @@ -1002,7 +1002,11 @@ class ORM_Core { */ public function reload() { - return $this->find($this->object[$this->primary_key]); + if ($this->_loaded) { + return $this->find($this->object[$this->primary_key]); + } else { + return $this->clear(); + } } /** diff --git a/system/libraries/drivers/Image/ImageMagick.php b/system/libraries/drivers/Image/ImageMagick.php index 31862f75..55c0ba24 100644 --- a/system/libraries/drivers/Image/ImageMagick.php +++ b/system/libraries/drivers/Image/ImageMagick.php @@ -133,7 +133,7 @@ class Image_ImageMagick_Driver extends Image_Driver { // Set the IM geometry based on the properties $geometry = escapeshellarg($prop['width'].'x'.$prop['height'].'+'.$prop['left'].'+'.$prop['top']); - if ($error = exec(escapeshellcmd($this->dir.'convert'.$this->ext).' -background '.$this->background.' -flatten -crop '.$geometry.' '.$this->cmd_image.' '.$this->cmd_image)) + if ($error = exec(escapeshellcmd($this->dir.'convert'.$this->ext).' -background '.$this->background.' -flatten -crop '.$geometry.'! '.$this->cmd_image.' '.$this->cmd_image)) { $this->errors[] = $error; return FALSE; |