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:
Ben Ramsey
2018-07-19 16:53:00 -05:00
parent 735eb7e3c9
commit 8d621488c4
2 changed files with 90 additions and 31 deletions
+4
View File
@@ -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':