summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/curlproxy.php14
1 files changed, 4 insertions, 10 deletions
diff --git a/lib/curlproxy.php b/lib/curlproxy.php
index 7d4ca5d..93cdbdc 100644
--- a/lib/curlproxy.php
+++ b/lib/curlproxy.php
@@ -128,12 +128,9 @@ class proxy{
}
// sanitize URL
- try{
+ if($this->validateurl($url) === false){
- $this->validateurl($url);
- }catch(Exception $error){
-
- throw new Exception($error->getMessage());
+ throw new Exception("Invalid URL");
}
$this->clientcache();
@@ -353,12 +350,9 @@ class proxy{
$this->format = $format;
// sanitize URL
- try{
-
- $this->validateurl($url);
- }catch(Exception $error){
+ if($this->validateurl($url) === false){
- throw new Exception($error->getMessage());
+ throw new Exception("Invalid URL");
}
$this->clientcache();