Skip to content

Commit

Permalink
Update ProxySettings.php
Browse files Browse the repository at this point in the history
systopia#46 Add ability to match pre-releases and build labels e.g. "-dev"
  • Loading branch information
codebymikey authored Oct 12, 2020
1 parent bbf5c3c commit 21f2d22
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ function requestProxyVersion($url) {
if($response === FALSE) {
return array('is_error' => 1, 'message' => sprintf(ts('Error: cannot access "%s"'), $url));
}else{
$result = preg_match("/<p id=\"version\">CiviProxy Version ([0-9]+\.[0-9]+|[0-9]+\.[0-9]+\.[0-9]+)<\/p>/", $response, $output_array);
$result = preg_match("/<p id=\"version\">CiviProxy Version (([0-9]+\.[0-9]+|[0-9]+\.[0-9]+\.[0-9]+)(?:-[0-9A-Za-z-]+)?)<\/p>/", $response, $output_array);
if ($result === FALSE || $result === 0){
return array('is_error' => 1, 'message' => sprintf(ts('Error: failed to parse version information'), $url));
return array('is_error' => 1, 'message' => sprintf(ts('Error: failed to parse version information: (%s)'), $url));
}else{
return array('is_error' => 0, 'version' => $output_array[1]);
}
Expand Down

0 comments on commit 21f2d22

Please sign in to comment.