Ori.livneh has uploaded a new change for review.
https://gerrit.wikimedia.org/r/69966
Change subject: Don't log null UASs
......................................................................
Don't log null UASs
When the user agent string is unavailable, it *is* set -- to null.
Bug: 50001
Change-Id: I1626af38640c921e616be05f93d42ba795eaaf01
---
M CoreEvents.php
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CoreEvents
refs/changes/66/69966/1
diff --git a/CoreEvents.php b/CoreEvents.php
index 37aa5b6..8c86e2f 100644
--- a/CoreEvents.php
+++ b/CoreEvents.php
@@ -47,7 +47,7 @@
'isMobile' => ( class_exists( 'MobileContext' )
&&
MobileContext::singleton()->shouldDisplayMobileView() ),
);
- if ( isset( $_SERVER[ 'HTTP_USER_AGENT' ] ) ) {
+ if ( !empty( $_SERVER[ 'HTTP_USER_AGENT' ] ) ) {
$event[ 'userAgent' ] = $_SERVER[ 'HTTP_USER_AGENT' ];
}
efLogServerSideEvent( 'PageContentSaveComplete', 5588433,
$event );
--
To view, visit https://gerrit.wikimedia.org/r/69966
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1626af38640c921e616be05f93d42ba795eaaf01
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CoreEvents
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits