External Libraries: Update Random_Compat from 1.2.1 to 2.0.11.

Notably this fixes PHP7 parse errors of the files and removes the OpenSSL functionality.
Full Changes: https://github.com/paragonie/random_compat/compare/v1.2.1...v2.0.11

Props jrdelarosa.
See #42439.

Built from https://develop.svn.wordpress.org/trunk@42130


git-svn-id: http://core.svn.wordpress.org/trunk@41961 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dion Hulse
2017-11-08 11:48:49 +00:00
parent e822e4578a
commit 0a81bcf4ff
12 changed files with 734 additions and 758 deletions

View File

@@ -4,8 +4,8 @@
* for using the new PHP 7 random_* API in PHP 5 projects
*
* The MIT License (MIT)
*
* Copyright (c) 2015 Paragon Initiative Enterprises
*
* Copyright (c) 2015 - 2017 Paragon Initiative Enterprises
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -35,8 +35,15 @@ if (!class_exists('Error', false)) {
}
if (!class_exists('TypeError', false)) {
class TypeError extends Error
{
if (is_subclass_of('Error', 'Exception')) {
class TypeError extends Error
{
}
} else {
class TypeError extends Exception
{
}
}
}