diff --git a/includes/pipeline_page/_index.php b/includes/pipeline_page/_index.php index 47bfa528ce..cd939edf51 100644 --- a/includes/pipeline_page/_index.php +++ b/includes/pipeline_page/_index.php @@ -136,14 +136,14 @@ $api_opts = stream_context_create(['http' => ['method' => 'GET', 'header' => ['User-Agent: PHP']]]); $gh_launch_schema_url = "https://api.github.com/repos/sanger-tol/{$pipeline->name}/contents/nextflow_schema.json?ref={$release}"; $gh_launch_schema_json = file_get_contents($gh_launch_schema_url, false, $api_opts); - if (strpos($http_response_header[0], 'HTTP/1.0 200') === false) { + if (preg_match('/HTTP\/\d\.*\d* 200/', $http_response_header[0]) === false) { echo ''; # Remember for next time - if (strpos($http_response_header[0], 'HTTP/1.0 404') !== false) { + if (preg_match('/HTTP\/\d\.*\d* 404/', $http_response_header[0]) !== false) { file_put_contents($gh_pipeline_no_schema_fn, ''); } } else {