Added /u modifer for UTF-8

This commit is contained in:
Jack-Benny Persson 2014-08-03 17:22:18 +02:00
parent 38370d9f27
commit 277bcc5fb4
2 changed files with 4 additions and 1 deletions

View File

@ -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

View File

@ -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