Make WordPress Core


Ignore:
Timestamp:
03/08/2016 05:14:52 PM (9 years ago)
Author:
ocean90
Message:

Update Random_Compat from 1.1.6 to 1.2.1.

Changes: https://github.com/paragonie/random_compat/compare/1.1.6...v1.2.1

See #35665.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/random_compat/byte_safe_strings.php

    r35365 r36886  
    5151                );
    5252            }
     53
    5354            return mb_strlen($binary_string, '8bit');
    5455        }
     56
    5557    } else {
    5658        /**
     
    7880
    7981if (!function_exists('RandomCompat_substr')) {
     82
    8083    if (
    81         defined('MB_OVERLOAD_STRING') &&
     84        defined('MB_OVERLOAD_STRING')
     85        &&
    8286        ini_get('mbstring.func_overload') & MB_OVERLOAD_STRING
    8387    ) {
     
    103107                );
    104108            }
     109
    105110            if (!is_int($start)) {
    106111                throw new TypeError(
     
    108113                );
    109114            }
     115
    110116            if ($length === null) {
    111117                /**
     
    119125                );
    120126            }
     127
    121128            return mb_substr($binary_string, $start, $length, '8bit');
    122129        }
     130
    123131    } else {
     132
    124133        /**
    125134         * substr() implementation that isn't brittle to mbstring.func_overload
     
    142151                );
    143152            }
     153
    144154            if (!is_int($start)) {
    145155                throw new TypeError(
     
    147157                );
    148158            }
     159
    149160            if ($length !== null) {
    150161                if (!is_int($length)) {
     
    153164                    );
    154165                }
     166
    155167                return substr($binary_string, $start, $length);
    156168            }
     169
    157170            return substr($binary_string, $start);
    158171        }
Note: See TracChangeset for help on using the changeset viewer.