Skip to content

Commit 4f9038d

Browse files
Merge pull request #19 from xa81/main
Bump version to 2.1.12 and improve processor count retrieval logic
2 parents 7d59da1 + 260460a commit 4f9038d

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

DomainNameApi/DomainNameAPI_PHPLibrary.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
/**
1111
* Class DomainNameAPI_PHPLibrary
1212
* @package DomainNameApi
13-
* @version 2.1.11
13+
* @version 2.1.12
1414
*/
1515

1616

@@ -25,7 +25,7 @@ class DomainNameAPI_PHPLibrary
2525
/**
2626
* Version of the library
2727
*/
28-
const VERSION = '2.1.11';
28+
const VERSION = '2.1.12';
2929

3030
const DEFAULT_NAMESERVERS = [
3131
'ns1.domainnameapi.com',
@@ -1920,9 +1920,7 @@ private function sendPerformanceMetricsToSentry(array $metrics): void
19201920
],
19211921
'device' => [
19221922
'hostname' => gethostname() ?: 'unknown',
1923-
'processor_count' => defined('PHP_OS_FAMILY') && PHP_OS_FAMILY === 'Linux' ?
1924-
(int)shell_exec('nproc 2>/dev/null') ?: 1 : 1
1925-
]
1923+
'processor_count' => defined('PHP_OS_FAMILY') && PHP_OS_FAMILY === 'Linux' ? (function_exists('shell_exec') ? (int)\shell_exec('nproc 2>/dev/null') ?: 1 : 1) : 1 ]
19261924
],
19271925
'tags' => [
19281926
'release' => self::VERSION,

0 commit comments

Comments
 (0)