Skip to content

Commit 2c2c40c

Browse files
committed
This function exists since 5.6.1.
1 parent d342d71 commit 2c2c40c

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

collectors/environment.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -224,12 +224,9 @@ public function process() {
224224
'host' => null,
225225
'OS' => null,
226226
'arch' => null,
227+
'basicauth' => wp_is_site_protected_by_basic_auth() ? 'true' : 'false',
227228
);
228229

229-
if ( function_exists( 'wp_is_site_protected_by_basic_auth' ) ) {
230-
$this->data->server['basicauth'] = wp_is_site_protected_by_basic_auth() ? 'true' : 'false';
231-
}
232-
233230
if ( function_exists( 'php_uname' ) ) {
234231
$this->data->server['host'] = php_uname( 'n' );
235232
$this->data->server['OS'] = php_uname( 's' ) . ' ' . php_uname( 'r' );

data/environment.php

+1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ class QM_Data_Environment extends QM_Data {
6262
* host: string|null,
6363
* OS: string|null,
6464
* arch: string|null,
65+
* basicauth: 'true'|'false',
6566
* }>
6667
*/
6768
public $server;

0 commit comments

Comments
 (0)