diff --git a/src/Guzzle/Http/Url.php b/src/Guzzle/Http/Url.php
index <HASH>..<HASH> 100644
--- a/src/Guzzle/Http/Url.php
+++ b/src/Guzzle/Http/Url.php
@@ -33,10 +33,11 @@ class Url
         static $defaults = array('scheme' => null, 'host' => null, 'path' => null, 'port' => null, 'query' => null,
             'user' => null, 'pass' => null, 'fragment' => null);
 
-        if (parse_url($url))
-            $parts = parse_url($url) + $defaults;
-        else
+        if ($parts = parse_url($url)) {
+            $parts = $parts + $defaults;
+        } else {
             throw new InvalidArgumentException('Was unable to parse malformed url: ' . $url);
+        }
         // Convert the query string into a QueryString object
         if ($parts['query'] || 0 !== strlen($parts['query'])) {
             $parts['query'] = QueryString::fromString($parts['query']);
Modified to adhere to PSR-2 and only call parse_url once