Skip to content

Array to string conversion warning #9

@codewizdevs

Description

@codewizdevs

Describe the bug
When on plugin settings page:

Warning: Array to string conversion in /home/maskeduser/htdocs/dev.masked.com/wp-includes/formatting.php on line 1108

The last update message gives:
Last Status Update: (masked url) » Array

To Reproduce
Steps to reproduce the behavior:
Using php 8.2 or 8.1, latest wordpress version as of 20 feb 2024.

Expected behavior
Should post twitter status instead of array to string.
My twitter api is used up, so the error i should be getting is Too Many Requests: Too Many Requests, if this means anything to you.

How to fix:

file wpt-functions.php, line 223, the $log[1] is an array not a string, therefore:

$notice = esc_html( $log[1]['message'] );

The function wpt_get_log fails at statement:

$log = get_post_meta( $id, '_' . $data, true );

The function should return string as specified in the comment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions