summaryrefslogtreecommitdiff
path: root/system/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/ORM.php6
-rw-r--r--system/libraries/drivers/Image/ImageMagick.php2
2 files changed, 6 insertions, 2 deletions
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;