• Resolved Gaurab

    (@kcgaurab)


    PHP Fatal error: Uncaught TypeError: array_reverse(): Argument #1 ($array) must be of type array, string given in server_directory/wp-content/plugins/wp-linkedin-auto-publish/wp-linkedin-auto-publish.php:1237

    It started happening last month. I have used this plugin without any errors for more than 4years, and I update the site and the plugin every year.

    I have tried deactivating and reactivating the plugin, as well as updating it to the latest version, but I cannot resolve the issue.

    While reviewing the plugin file, I noticed that the issues related to the array_reverse() function should take an array instead of a string.

    if(metadata_exists('post', $post->ID, '_sent_to_linkedin')) {
    foreach(array_reverse(get_post_meta($post->ID, '_sent_to_linkedin', true )) as $share){
    echo $share.'
    ';
    }

    While reviewing the database, I noticed that the meta value is serialized in string format. I’m still encountering an error in my debug log. To prevent it from being displayed, I am hiding all the debug logs.

    Please review and address these issues.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.