mirror of
https://github.com/ramsey/uuid.git
synced 2026-06-14 15:56:48 +03:00
Check whether passthru() is disabled
If passthru() is disabled in php.ini, this will force the SystemNodeProvider to return `false` for the node. Using the default FallbackNodeProvider, ramsey/uuid will default to the RandomNodeProvider, in these cases. Closes #114
This commit is contained in:
@@ -62,6 +62,10 @@ class SystemNodeProvider implements NodeProviderInterface
|
||||
*/
|
||||
protected function getIfconfig()
|
||||
{
|
||||
if (strpos(strtolower(ini_get('disable_functions')), 'passthru') !== false) {
|
||||
return '';
|
||||
}
|
||||
|
||||
ob_start();
|
||||
switch (strtoupper(substr(php_uname('a'), 0, 3))) {
|
||||
case 'WIN':
|
||||
|
||||
Reference in New Issue
Block a user