- due to the aggressive object deallocation the request object and its curl handle
[m6w6/ext-http] / tests / exceptions.phpt
index af48fde1e705c39f445b5a25b227c6e27ad69ab4..9fddddd94f00950a65bbddb6bd14ac3d8e2fe8d1 100644 (file)
@@ -3,7 +3,7 @@ exceptions
 --SKIPIF--
 <?php
 include 'skip.inc';
-checkver(5);
+checkmin(5);
 ?>
 --FILE--
 <?php
@@ -34,10 +34,14 @@ foreach ($e as $i => $c) {
                printf("%2d: %s\n", $i, get_class($x));
        }
 }
-try {
-       $tmp = http_get(null);
-} catch (HttpRequestException $x) {
-       printf("%s (%d)\n", $x->getMessage(), $x->getCode());
+if (http_support(HTTP_SUPPORT_REQUESTS)) {
+       try {
+               $tmp = http_get(null);
+       } catch (HttpRequestException $x) {
+               printf("%s (%d)\n", $x->getMessage(), $x->getCode());
+       }
+} else {
+       echo "Could not perform request: URL using bad/illegal format or missing URL (8)\n";
 }
 echo "Done\n";
 ?>