Willkommen Gast. Bitte Einloggen oder Registrieren
 
Sprache wählen:
 
  Last Script Version: 20

  ÜbersichtHilfeSuchenEinloggenRegistrieren  
 
Seitenindex umschalten Seiten: 1
Thema versenden Drucken
preg-match: Unknown modifier (Gelesen: 11094 mal)
Piet
YaBB Newbies
*
Offline



Beiträge: 25
preg-match: Unknown modifier
09.02.16 um 13:31:32
 
Hi, I noticed in my error log that the function operating_system_detection() in the func_operating_system.php file produces the following error:

Code:
[09-Feb-2016 09:00:38 UTC] PHP Warning:  preg_match() [<a href='function.preg-match'>function.preg-match</a>]: Unknown modifier '.' in /home/mywebsite/public_html/web/func/func_operating_system.php on line 142
 



My error log is filled up with the above error message.

Zum Seitenanfang
 
 
IP gespeichert
 
Reimar
Administrator
*****
Offline



Beiträge: 1979
Geschlecht: male
Re: preg-match: Unknown modifier
Antwort #1 - 09.02.16 um 14:16:53
 
This is not an error, just a warning.
The desired function just gets to less information to work conform.
We will have to put extra code into this function to prevent this behaviour, this will be done with the next update.
Zum Seitenanfang
 
 
IP gespeichert
 
Piet
YaBB Newbies
*
Offline



Beiträge: 25
Re: preg-match: Unknown modifier
Antwort #2 - 09.02.16 um 15:36:25
 
Thanks very much for your quick response. Is there an easy way to fix this in the mean time?
Zum Seitenanfang
 
 
IP gespeichert
 
Reimar
Administrator
*****
Offline



Beiträge: 1979
Geschlecht: male
Re: preg-match: Unknown modifier
Antwort #3 - 09.02.16 um 15:42:47
 
Question back: is the module operating system in your stat filled with valid values?
Zum Seitenanfang
 
 
IP gespeichert
 
Piet
YaBB Newbies
*
Offline



Beiträge: 25
Re: preg-match: Unknown modifier
Antwort #4 - 10.02.16 um 07:22:36
 
Yes, it looks like they are all valid values.
Zum Seitenanfang
 
 
IP gespeichert
 
Reimar
Administrator
*****
Offline



Beiträge: 1979
Geschlecht: male
Re: preg-match: Unknown modifier
Antwort #5 - 10.02.16 um 14:10:54
 
ok thx. Then we have just to exclude this misuse of the operating system detection function.
Zum Seitenanfang
 
 
IP gespeichert
 
Piet
YaBB Newbies
*
Offline



Beiträge: 25
Re: preg-match: Unknown modifier
Antwort #6 - 11.08.16 um 12:05:08
 
Hi, has this issue been resolved yet?
Zum Seitenanfang
 
 
IP gespeichert
 
Piet
YaBB Newbies
*
Offline



Beiträge: 25
Re: preg-match: Unknown modifier
Antwort #7 - 21.01.17 um 16:13:07
 
Any news regarding this issue?
Zum Seitenanfang
 
 
IP gespeichert
 
Reimar
Administrator
*****
Offline



Beiträge: 1979
Geschlecht: male
Re: preg-match: Unknown modifier
Antwort #8 - 21.01.17 um 20:33:44
 
Soory no, there has not been any change, we did not get this warning.
Is it still like this? Still the same PHP version on your server?
Zum Seitenanfang
 
 
IP gespeichert
 
Piet
YaBB Newbies
*
Offline



Beiträge: 25
Re: preg-match: Unknown modifier
Antwort #9 - 24.01.17 um 09:56:12
 
I did some testing, and it seems that the php warning is only generated when the $_SERVER [ "HTTP_USER_AGENT" ] variable returns an empty string.

For example, when I updated the following line:

Code (PHP):
$operating_system = strip_tags ( operating_system_detection ( $_SERVER [ "HTTP_USER_AGENT" ] ) ); // get operating system
 


to:

Code (PHP):
$operating_system = strip_tags ( operating_system_detection ( '' ) ); // get operating system 



I got the following warning again in the error log:

Code:
PHP Warning:  preg_match() [<a href='function.preg-match'>function.preg-match</a>]: Unknown modifier ']' in /home/my_website/public_html/web/func/func_operating_system.php on line 143 


Zum Seitenanfang
 
 
IP gespeichert
 
Seitenindex umschalten Seiten: 1
Thema versenden Drucken