Tag: Errors

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
Channel Not Confirmed

Channel Not Confirmed

This error was meant to indicate that the giving channel has not been entered properly but right now it also appears if the user_read permission has not been granted in scopes.

In April 2018 two users complained about seeing this notice after a plugin update. The solution is to complete the Setup Wizard again and apply user_read, unless the spelling of the channel is the issue.

TwitchPress Channel Not Confirmed

TwitchPress channel_read not permitted – get_tokens_channel()

TwitchPress channel_read not permitted – get_tokens_channel()

Prior to 2.0 the following log entry can be ignored. It is generated by a small test that generates information in the Help tab. The log entry is made due to a lack of permissions to complete the desired API call. The API call method is not currently used in any important functionality but this may change after 2.0 so please keep this in mind.

TwitchPress scope channel_read was not permitted by administration and is required by get_tokens_channel().

Additional Log Entry

The following log entry will be found beside the above entry. This additional entry is generated by the actual server response. The above entry is generated by the logic of the plugin.

TwitchPress HTTPDStatus: 401 – The OAuth token does not have the correct scope or does not have the required permission on behalf of the specified user.