Skip to content
Snippets Groups Projects
Commit 5d1d11a5 authored by Erick Hitter's avatar Erick Hitter
Browse files

Resolve undefined index notice

parent 9b0ebc72
No related branches found
No related tags found
No related merge requests found
......@@ -159,7 +159,7 @@ function wp_redis_cache_set_device_key( $key ) {
* @return string
*/
function wp_redis_cache_get_device_type() {
$ua = $_SERVER['HTTP_USER_AGENT'];
$ua = isset( $_SERVER['HTTP_USER_AGENT'] ) ? $_SERVER['HTTP_USER_AGENT'] : '';
if ( empty( $ua ) ) {
return 'desktop';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment