X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=tests%2Fexceptions.phpt;h=aef60595ab0108c19fccad565f094159133fd97c;hp=af48fde1e705c39f445b5a25b227c6e27ad69ab4;hb=dfe2dbf042d42f83255b6ff46c2210bcd57ca586;hpb=2b1bdfab2a6402e4daec69f6b7c395b0662e18d7 diff --git a/tests/exceptions.phpt b/tests/exceptions.phpt index af48fde..aef6059 100644 --- a/tests/exceptions.phpt +++ b/tests/exceptions.phpt @@ -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"; ?>