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