Update random_compat to master.
Clarifies strings, Merges [35587] upstream. See #34409, #28633 git-svn-id: https://develop.svn.wordpress.org/trunk@35600 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
530d10e330
commit
bea9afed7d
|
@ -110,8 +110,8 @@ if (PHP_VERSION_ID < 70000) {
|
||||||
DIRECTORY_SEPARATOR === '/' &&
|
DIRECTORY_SEPARATOR === '/' &&
|
||||||
PHP_VERSION_ID >= 50300
|
PHP_VERSION_ID >= 50300
|
||||||
) ||
|
) ||
|
||||||
// Windows with PHP >= 5.3.4
|
// Windows with PHP >= 5.4.1
|
||||||
PHP_VERSION_ID >= 50401 // Modification from upstream, see #34409
|
PHP_VERSION_ID >= 50401
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
// See random_bytes_openssl.php
|
// See random_bytes_openssl.php
|
||||||
|
|
|
@ -72,6 +72,6 @@ function random_bytes($bytes)
|
||||||
* If we reach here, PHP has failed us.
|
* If we reach here, PHP has failed us.
|
||||||
*/
|
*/
|
||||||
throw new Exception(
|
throw new Exception(
|
||||||
'PHP failed to generate random data.'
|
'Could not gather sufficient random data'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -132,6 +132,6 @@ function random_bytes($bytes)
|
||||||
* If we reach here, PHP has failed us.
|
* If we reach here, PHP has failed us.
|
||||||
*/
|
*/
|
||||||
throw new Exception(
|
throw new Exception(
|
||||||
'PHP failed to generate random data.'
|
'Error reading from source device'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,6 +79,6 @@ function random_bytes($bytes)
|
||||||
* If we reach here, PHP has failed us.
|
* If we reach here, PHP has failed us.
|
||||||
*/
|
*/
|
||||||
throw new Exception(
|
throw new Exception(
|
||||||
'PHP failed to generate random data.'
|
'Could not gather sufficient random data'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,6 +67,6 @@ function random_bytes($bytes)
|
||||||
* If we reach here, PHP has failed us.
|
* If we reach here, PHP has failed us.
|
||||||
*/
|
*/
|
||||||
throw new Exception(
|
throw new Exception(
|
||||||
'PHP failed to generate random data.'
|
'Could not gather sufficient random data'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,6 +71,6 @@ function random_bytes($bytes)
|
||||||
* If we reach here, PHP has failed us.
|
* If we reach here, PHP has failed us.
|
||||||
*/
|
*/
|
||||||
throw new Exception(
|
throw new Exception(
|
||||||
'PHP failed to generate random data.'
|
'Could not gather sufficient random data'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue