mirror of
https://github.com/ramsey/uuid.git
synced 2026-06-15 16:07:55 +03:00
bug fixes
- add missing default value - invert logic, because it was doing it the wrong way around
This commit is contained in:
@@ -39,11 +39,11 @@ class SystemNodeProvider implements NodeProviderInterface
|
||||
$matches = array();
|
||||
|
||||
// first try a linux specific way
|
||||
|
||||
$node = $this->getsysfs();
|
||||
|
||||
// Search the ifconfig output for all MAC addresses and return
|
||||
// the first one found
|
||||
if ($node !== false) {
|
||||
if ($node === false) {
|
||||
if (preg_match_all($pattern, $this->getIfconfig(), $matches, PREG_PATTERN_ORDER)) {
|
||||
$node = $matches[1][0];
|
||||
}
|
||||
@@ -86,6 +86,7 @@ class SystemNodeProvider implements NodeProviderInterface
|
||||
*/
|
||||
protected function getsysfs()
|
||||
{
|
||||
$mac = false;
|
||||
if (strtoupper(php_uname('s')) === "LINUX") {
|
||||
// get all the macadresses of all systems
|
||||
$macs = array_map(
|
||||
|
||||
Reference in New Issue
Block a user