diff --git a/HISTORY b/HISTORY index 12539da..57a42ce 100644 --- a/HISTORY +++ b/HISTORY @@ -1,3 +1,6 @@ +0.3 - 2014-08-03 + Added /u modifier to the preg_match for UTF-8 + 0.2 - 2014-07-31 Replaced 'shell_exec("curl -s URL")' with PHP cURL function Replaced all state-variables with constants diff --git a/check_smhiwarn.php b/check_smhiwarn.php index e716cb6..9edbc4d 100755 --- a/check_smhiwarn.php +++ b/check_smhiwarn.php @@ -133,7 +133,7 @@ $data = curl_exec($ch); curl_close($ch); // Regex the area (1st paranthesis is area, 2nd is warning class, 3rd is warning msg) -preg_match("/($district)(?:: )(?:Varning klass )([1-3]+)(?:,\s)([-a-z0-9åäö.,&\s]*)/i", +preg_match("/($district)(?:: )(?:Varning klass )([1-3]+)(?:,\s)([-a-z0-9åäö.,&\s]*)/iu", $data, $matches); // Count how many warnings are issued and issue a critical if more than one