In User->isBot(), the web server might not include 'HTTP_USER_AGENT' when passing to PHP the $_SERVER array. Particularly when the client app does not send one, such as when implementing CURL (see #3044). (Another instance was dealt with in the Session class: #3252.) PHP further complains about passing a null to strtolower().
In
User->isBot()
, the web server might not include 'HTTP_USER_AGENT' when passing to PHP the$_SERVER
array. Particularly when the client app does not send one, such as when implementing CURL (see #3044). (Another instance was dealt with in the Session class: #3252.) PHP further complains about passing a null tostrtolower()
.Suggest:
The string 'curl' is in the
$_bot_sigs
array.If a web request does not contain a User Agent string, assume it is from something that is of no interest.