Skip to content
Snippets Groups Projects
Commit c6bd441c authored by Thibault Debatty's avatar Thibault Debatty
Browse files

fix cpu vcores parsing bug

parent 133bbc89
No related branches found
No related tags found
No related merge requests found
Pipeline #19836 passed
......@@ -23,11 +23,14 @@ class ServerInfoFreeBSDCPU extends ServerInfoParser
preg_match_all($REGEX, $string, $matches);
var_dump($matches);
foreach ($matches[1] as $match) {
$count += $match[0];
}
// if regex does not match, or dmi info is empty...
if ($count == 0) {
return;
}
$cpuinfo["threads"] = $count;
$info->cpuinfo = $cpuinfo;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment