Skip to content

Commit

Permalink
This function exists since 5.6.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbillion committed Jul 27, 2024
1 parent d342d71 commit 2c2c40c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
5 changes: 1 addition & 4 deletions collectors/environment.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,9 @@ public function process() {
'host' => null,
'OS' => null,
'arch' => null,
'basicauth' => wp_is_site_protected_by_basic_auth() ? 'true' : 'false',
);

if ( function_exists( 'wp_is_site_protected_by_basic_auth' ) ) {
$this->data->server['basicauth'] = wp_is_site_protected_by_basic_auth() ? 'true' : 'false';
}

if ( function_exists( 'php_uname' ) ) {
$this->data->server['host'] = php_uname( 'n' );
$this->data->server['OS'] = php_uname( 's' ) . ' ' . php_uname( 'r' );
Expand Down
1 change: 1 addition & 0 deletions data/environment.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class QM_Data_Environment extends QM_Data {
* host: string|null,
* OS: string|null,
* arch: string|null,
* basicauth: 'true'|'false',
* }>
*/
public $server;
Expand Down

0 comments on commit 2c2c40c

Please sign in to comment.