diff --git a/lib/class.image.php b/lib/class.image.php
index 148a5a9..dd315cc 100755
--- a/lib/class.image.php
+++ b/lib/class.image.php
@@ -57,7 +57,7 @@ public static function loadExternal($uri){
// get the raw body response, ignore errors
$response = @$gateway->exec();
- if($response === false){
+ if(!$response){
throw new Exception(sprintf('Error reading external image %s. Please check the URI.', $uri));
}
@@ -67,7 +67,7 @@ public static function loadExternal($uri){
// Symphony 2.4 enhances the TMP constant so it can be relied upon
$dest = tempnam(TMP, 'IMAGE');
- if(!file_put_contents($dest, $response)) {
+ if(file_put_contents($dest, $response) === false) {
throw new Exception(sprintf('Error writing to temporary file %s.', $dest));
}