X-Git-Url: https://git.rapsys.eu/packbundle/blobdiff_plain/41e15ab5df817a5178b73a08bcfb2298842cc559..2aefda55632c6c04c59d2b2fa244362b6a419228:/Parser/TokenParser.php diff --git a/Parser/TokenParser.php b/Parser/TokenParser.php index 1115e0c..07267b9 100644 --- a/Parser/TokenParser.php +++ b/Parser/TokenParser.php @@ -50,7 +50,7 @@ class TokenParser extends AbstractTokenParser { 'http' => [ #'header' => ['Referer: https://www.openstreetmap.org/'], 'max_redirects' => $_ENV['RAPSYSPACK_REDIRECT'] ?? 20, - 'timeout' => $_ENV['RAPSYSPACK_TIMEOUT'] ?? (int)ini_get('default_socket_timeout') ?: 60, + 'timeout' => $_ENV['RAPSYSPACK_TIMEOUT'] ?? (($timeout = ini_get('default_socket_timeout')) !== false && $timeout !== "" ? (float)$timeout : 60), 'user_agent' => $_ENV['RAPSYSPACK_AGENT'] ?? (($agent = ini_get('user_agent')) !== false && $agent !== "" ? (string)$agent : RapsysPackBundle::getAlias().'/'.RapsysPackBundle::getVersion()) ] ]