Commit 5d1d11a5 authored by Erick Hitter's avatar Erick Hitter

Resolve undefined index notice

parent 9b0ebc72
...@@ -159,7 +159,7 @@ function wp_redis_cache_set_device_key( $key ) { ...@@ -159,7 +159,7 @@ function wp_redis_cache_set_device_key( $key ) {
* @return string * @return string
*/ */
function wp_redis_cache_get_device_type() { 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 ) ) { if ( empty( $ua ) ) {
return 'desktop'; return 'desktop';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment