PHP_OS predefined constant was used instead of php_uname() function.

This commit is contained in:
Türkalp Burak KAYRANCIOĞLU
2019-10-26 13:34:38 +03:00
parent 4c467ce4d5
commit c0183c581e
+2 -2
View File
@@ -67,7 +67,7 @@ class SystemNodeProvider implements NodeProviderInterface
}
ob_start();
switch (strtoupper(substr(php_uname('a'), 0, 3))) {
switch (strtoupper(substr(PHP_OS, 0, 3))) {
case 'WIN':
passthru('ipconfig /all 2>&1');
break;
@@ -95,7 +95,7 @@ class SystemNodeProvider implements NodeProviderInterface
{
$mac = false;
if (strtoupper(php_uname('s')) === 'LINUX') {
if (strtoupper(PHP_OS) === 'LINUX') {
$addressPaths = glob('/sys/class/net/*/address', GLOB_NOSORT);
if (empty($addressPaths)) {