WordPress.org

Making WordPress.org


Ignore:
Timestamp:
09/29/2017 07:20:28 PM (3 years ago)
Author:
coffee2code
Message:

Browse Happy API: Improve handling of unknown browsers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/api.wordpress.org/public_html/core/browse-happy/1.0/parse.php

    r5979 r5980  
    7272    }
    7373
     74    // No indentifiers provided
     75    if ( empty( $result['name'] ) ) {
     76        $data['name'] = 'unknown';
     77    }
    7478    // Opera
    75     if (
     79    elseif (
    7680        false !== ( $key = array_search( 'Opera Mini', $result['name'] ) )
    7781    ||
     
    123127        } else {
    124128            $key = 0;
    125             $data['name'] = 'webkit';
     129            $data['name'] = 'unknown';
     130            $result['version'][ $key ] = '';
    126131        }
    127132        $data['version'] = $result['version'][ $key ];
Note: See TracChangeset for help on using the changeset viewer.