WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/08/2016 05:14:52 PM (6 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/random_int.php

    r35365 r36886  
    5656        );
    5757    }
     58
    5859    try {
    5960        $max = RandomCompat_intval($max);
     
    7475        );
    7576    }
     77
    7678    if ($max === $min) {
    7779        return $min;
     
    99101     */
    100102    if (!is_int($range)) {
     103
    101104        /**
    102105         * Still safely calculate wider ranges.
     
    112115        $bytes = PHP_INT_SIZE;
    113116        $mask = ~0;
     117
    114118    } else {
     119
    115120        /**
    116121         * $bits is effectively ceil(log($range, 2)) without dealing with
     
    182187         */
    183188    } while (!is_int($val) || $val > $max || $val < $min);
     189
    184190    return (int) $val;
    185191}
Note: See TracChangeset for help on using the changeset viewer.