From: Thomas Deutschmann Date: Tue, 18 May 2021 17:55:47 +0000 (+0200) Subject: tests: use getenv() to access environment variable X-Git-Tag: v4.2.0~14^2 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=refs%2Fpull%2F113%2Fhead;p=m6w6%2Fext-http tests: use getenv() to access environment variable Fixes Warning: Undefined array key "PATH" in pecl-http-4.1.0/work/php8.0/tests/skipif.inc on line 56 --- diff --git a/tests/skipif.inc b/tests/skipif.inc index 51272fb..76c3bd7 100644 --- a/tests/skipif.inc +++ b/tests/skipif.inc @@ -53,7 +53,7 @@ function skip_http2_test($message = "skip need http2 support") { if (!(http\Client\Curl\FEATURES & http\Client\Curl\Features\HTTP2)) { die("$message (FEATURES & HTTP2)\n"); } - foreach (explode(":", $_ENV["PATH"]) as $path) { + foreach (explode(":", getenv("PATH")) as $path) { if (is_executable($path . "/nghttpd")) { return; }