Make WordPress Core


Ignore:
Timestamp:
02/14/2010 02:27:19 AM (15 years ago)
Author:
nacin
Message:

Use stripos() instead of strpos() with strtolower(). For PHP < 5 we have stripos() in compat.php. Fixes #11176

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-ajax.php

    r13088 r13132  
    9494            if ( !isset($_SERVER['HTTP_ACCEPT_ENCODING']) )
    9595                die('-1');
    96             if ( false !== strpos( strtolower($_SERVER['HTTP_ACCEPT_ENCODING']), 'deflate') && function_exists('gzdeflate') && ! $force_gzip ) {
     96            if ( false !== stripos( $_SERVER['HTTP_ACCEPT_ENCODING'], 'deflate') && function_exists('gzdeflate') && ! $force_gzip ) {
    9797                header('Content-Encoding: deflate');
    9898                $out = gzdeflate( $test_str, 1 );
    99             } elseif ( false !== strpos( strtolower($_SERVER['HTTP_ACCEPT_ENCODING']), 'gzip') && function_exists('gzencode') ) {
     99            } elseif ( false !== stripos( $_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') && function_exists('gzencode') ) {
    100100                header('Content-Encoding: gzip');
    101101                $out = gzencode( $test_str, 1 );
Note: See TracChangeset for help on using the changeset viewer.