Skip to content

Commit

Permalink
Deprecate Misc::generateRandom() method, #1036
Browse files Browse the repository at this point in the history
  • Loading branch information
glensc committed Apr 1, 2021
1 parent f8b3013 commit 70058eb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/eventum/class.misc.php
Original file line number Diff line number Diff line change
Expand Up @@ -538,9 +538,12 @@ public static function htmlentities($var): string
*
* @param int $size
* @return string
* @deprecated since 3.10.2, use random_bytes() instead
*/
public static function generateRandom($size = 32)
{
trigger_deprecation('eventum/eventum', '3.10.2', 'Method "%s::%s" is deprecated, use random_bytes', __CLASS__, __METHOD__);

return random_bytes($size);
}

Expand Down

0 comments on commit 70058eb

Please sign in to comment.