mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-01-27 00:58:25 +00:00
- add second function_exists call to prevent require_once from being called if autoloader was called
This commit is contained in:
parent
6cd2d154b4
commit
f0e1b2deec
@ -81,7 +81,9 @@ if (!class_exists('Math_BigInteger')) {
|
|||||||
*/
|
*/
|
||||||
// the class_exists() will only be called if the crypt_random function hasn't been defined and
|
// the class_exists() will only be called if the crypt_random function hasn't been defined and
|
||||||
// will trigger a call to __autoload() if you're wanting to auto-load classes
|
// will trigger a call to __autoload() if you're wanting to auto-load classes
|
||||||
if (!function_exists('crypt_random') && !class_exists('Crypt_Random')) {
|
// call function_exists() a second time to stop the require_once from being called outside
|
||||||
|
// of the auto loader
|
||||||
|
if (!function_exists('crypt_random') && !class_exists('Crypt_Random') && !function_exists('crypt_random')) {
|
||||||
require_once('Crypt/Random.php');
|
require_once('Crypt/Random.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,7 +106,9 @@ if (!class_exists('Crypt_RC4')) {
|
|||||||
*/
|
*/
|
||||||
// the class_exists() will only be called if the crypt_random function hasn't been defined and
|
// the class_exists() will only be called if the crypt_random function hasn't been defined and
|
||||||
// will trigger a call to __autoload() if you're wanting to auto-load classes
|
// will trigger a call to __autoload() if you're wanting to auto-load classes
|
||||||
if (!function_exists('crypt_random') && !class_exists('Crypt_Random')) {
|
// call function_exists() a second time to stop the require_once from being called outside
|
||||||
|
// of the auto loader
|
||||||
|
if (!function_exists('crypt_random') && !class_exists('Crypt_Random') && !function_exists('crypt_random')) {
|
||||||
require_once('Crypt/Random.php');
|
require_once('Crypt/Random.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,7 +82,9 @@ if (!class_exists('Math_BigInteger')) {
|
|||||||
*/
|
*/
|
||||||
// the class_exists() will only be called if the crypt_random function hasn't been defined and
|
// the class_exists() will only be called if the crypt_random function hasn't been defined and
|
||||||
// will trigger a call to __autoload() if you're wanting to auto-load classes
|
// will trigger a call to __autoload() if you're wanting to auto-load classes
|
||||||
if (!function_exists('crypt_random') && !class_exists('Crypt_Random')) {
|
// call function_exists() a second time to stop the require_once from being called outside
|
||||||
|
// of the auto loader
|
||||||
|
if (!function_exists('crypt_random') && !class_exists('Crypt_Random') && !function_exists('crypt_random')) {
|
||||||
require_once('Crypt/Random.php');
|
require_once('Crypt/Random.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user