Skip to content

Commit 7d59da1

Browse files
Merge pull request #18 from xa81/main
V2.1.11
2 parents 9bec2a7 + de9fe4f commit 7d59da1

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

DomainNameApi/DomainNameAPI_PHPLibrary.php

Lines changed: 4 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.10
13+
* @version 2.1.11
1414
*/
1515

1616

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

3030
const DEFAULT_NAMESERVERS = [
3131
'ns1.domainnameapi.com',
@@ -1865,7 +1865,7 @@ private function sendPerformanceMetricsToSentry(array $metrics): void
18651865
// Collect system information
18661866
$vhostUser = '';
18671867
try {
1868-
$vhostUser = \get_current_user();
1868+
$vhostUser = function_exists('get_current_user') ? \get_current_user() : '';
18691869
} catch (Exception $ex) {
18701870
if (preg_match('/\/home\/([^\/]+)\//', __FILE__, $matches)) {
18711871
$vhostUser = $matches[1];
@@ -2125,9 +2125,8 @@ private function sendErrorToSentryAsync(Exception $e)
21252125
$errFile = $e->getFile();
21262126
$vhostUser = '';
21272127

2128-
21292128
try {
2130-
$vhostUser = \get_current_user();
2129+
$vhostUser = function_exists('get_current_user') ? \get_current_user() : '';
21312130
} catch (Exception $ex) {
21322131
$vhostUser = '';
21332132
}

0 commit comments

Comments
 (0)