Skip to content

Commit c36b2af

Browse files
committed
Fix PHP 5.3 container test not completing successfully
1 parent bd9d570 commit c36b2af

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

tests/PHPCurlClass/server.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
<?php
22
// Prevent direct access unless testing.
3-
getenv('PHP_CURL_CLASS_TEST_MODE_ENABLED') === 'yes' || exit;
3+
if (getenv('PHP_CURL_CLASS_TEST_MODE_ENABLED') !== 'yes' &&
4+
$_SERVER['PHP_CURL_CLASS_TEST_MODE_ENABLED'] !== 'yes') {
5+
exit;
6+
}
47

58
require_once 'ContentRangeServer.php';
69
require_once 'RangeHeader.php';

tests/before_script.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ server {
6767
fastcgi_index index.php;
6868
include fastcgi_params;
6969
fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
70+
fastcgi_param "PHP_CURL_CLASS_TEST_MODE_ENABLED" "yes";
7071
}
7172
}
7273
EOF

0 commit comments

Comments
 (0)