Tag: Bugs

trim() expects parameter 1 to be string

trim() expects parameter 1 to be string

When activating the BugNet feature within TwitchPress you may see the following PHP log entry…

PHP Warning:  trim() expects parameter 1 to be string, object given in \wp-includes\class-wp-user.php on line 206

This warning begun to appear many weeks before I got around to investigating it. My findings confirm that the core is to blame. A back-trace I setup in class-wp-user.php near line 206 points to the dashboard.

PHP back-trace shows dashboard.php to be involved in the warning

On examining the dashboard source I can confirm that the warning happens within the Recent Comments widget and will not investigate this issue any further without evidence that suggests a cause by TwitchPress.

PHP error in WordPress dashboard page 2019