diff options
author | ArthurHoaro <arthur@hoa.ro> | 2021-01-20 11:31:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-20 11:31:35 +0100 |
commit | 055d97f9a9e67d8ee8ae81bbf59a4b846a145d9f (patch) | |
tree | fa133bbf7252f7a4a1f40929df007162dd0c1f0c /application/helper/ApplicationUtils.php | |
parent | baac4388b1696fb39f1b0bd621d215bba2da2ca8 (diff) | |
parent | dafd3f081ab581e074f3280d4323dc92cb33df46 (diff) | |
download | Shaarli-055d97f9a9e67d8ee8ae81bbf59a4b846a145d9f.tar.gz Shaarli-055d97f9a9e67d8ee8ae81bbf59a4b846a145d9f.tar.zst Shaarli-055d97f9a9e67d8ee8ae81bbf59a4b846a145d9f.zip |
Merge pull request #1695 from ArthurHoaro/fix/ut-curl
Diffstat (limited to 'application/helper/ApplicationUtils.php')
-rw-r--r-- | application/helper/ApplicationUtils.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/application/helper/ApplicationUtils.php b/application/helper/ApplicationUtils.php index a6c03aae..f79998b5 100644 --- a/application/helper/ApplicationUtils.php +++ b/application/helper/ApplicationUtils.php | |||
@@ -37,7 +37,7 @@ class ApplicationUtils | |||
37 | { | 37 | { |
38 | list($headers, $data) = get_http_response($url, $timeout); | 38 | list($headers, $data) = get_http_response($url, $timeout); |
39 | 39 | ||
40 | if (strpos($headers[0], '200 OK') === false) { | 40 | if (preg_match('#HTTP/[\d\.]+ 200(?: OK)?#', $headers[0]) !== 1) { |
41 | error_log('Failed to retrieve ' . $url); | 41 | error_log('Failed to retrieve ' . $url); |
42 | return false; | 42 | return false; |
43 | } | 43 | } |