Thanks. What environment is this on please?
Its my test/development site (i write plugins) https://betatest.opajaap.nl/
It runs WP 5.4.2, in config:
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_POST_REVISIONS', 3 );
define('SCRIPT_DEBUG', true);
It shows up on all pages (admin and frontend)
PHP version is 7.4.8
The fix to get rid of this annoying message is extremely simple:
In …/plugins/query-monitor/collectors/environment.php line 258
change:
protected static function get_current_user() {
$php_u = null;
if ( function_exists( 'posix_getpwuid' ) ) {
$u = posix_getpwuid( posix_getuid() );
$g = posix_getgrgid( $u['gid'] );
if ( ! empty( $u ) && ! empty( $g ) ) {
$php_u = $u['name'] . ':' . $g['name'];
}
}
into:
protected static function get_current_user() {
$php_u = null;
if ( function_exists( 'posix_getpwuid' ) ) {
$u = posix_getpwuid( posix_getuid() );
if ( is_array( $u ) ) {
$g = posix_getgrgid( $u['gid'] );
}
if ( ! empty( $u ) && ! empty( $g ) ) {
$php_u = $u['name'] . ':' . $g['name'];
}
}
Cross your fingers Jacob! 😀 This should be fixed in 3.6.2.