Giter Site home page Giter Site logo

PHP Fatal error: Uncaught TypeError: array_merge(): Argument #2 must be of type array, string given in syndication-links/includes/class-syn-meta.php:97 about syndication-links HOT 10 CLOSED

janboddez avatar janboddez commented on June 16, 2024
PHP Fatal error: Uncaught TypeError: array_merge(): Argument #2 must be of type array, string given in syndication-links/includes/class-syn-meta.php:97

from syndication-links.

Comments (10)

dshanske avatar dshanske commented on June 16, 2024 1

@janboddez It is in the readme.

syndication_links_display( true ) - Adds Syndication Links to content display.

Just add a false return to this filter.

from syndication-links.

janboddez avatar janboddez commented on June 16, 2024

Just FYI: the actual issue is definitely still present.

[10-Feb-2023 12:39:10 UTC] PHP Fatal error:  Uncaught TypeError: array_merge(): Argument #2 must be of type array, string given in <...>/syndication-links/includes/class-syn-meta.php:97
Stack trace:
#0 <...>/syndication-links/includes/class-syn-meta.php(97): array_merge()
#1 <...>/syndication-links/includes/class-syn-meta.php(102): Syn_Meta::screens()
... 

Reappeared the moment I reinstalled and activated the (latest version of the) plugin. (Presumably because the faulty setting is never purged, which is okay, as long as the code itself is able to handle it.)

from syndication-links.

dshanske avatar dshanske commented on June 16, 2024

I'll do the full array check then

from syndication-links.

janboddez avatar janboddez commented on June 16, 2024

Can give it another look later too. Might be sufficient to cast to an array, which I think would give you either an empty array or one with an empty string in it, at least until one or more post types are selected and saved. That would likely prevent the fatal error.

from syndication-links.

dshanske avatar dshanske commented on June 16, 2024

I have to upgrade my dev testing from 7.4 to 8.

from syndication-links.

dshanske avatar dshanske commented on June 16, 2024

@janboddez Check again?

from syndication-links.

janboddez avatar janboddez commented on June 16, 2024

I now get, or rather, got the error on the settings page only instead of it taking down the entire site. :-)

image

Mind you, I did not purge the settings from the database before reinstalling. Once I selected that first unlabeled checkbox and forced the form to submit, the error disappeared.

from syndication-links.

janboddez avatar janboddez commented on June 16, 2024

I'll have a look at the actual error as soon as I get the chance. (No longer actively using the plugin so it's not super urgent [for me] ...)

from syndication-links.

dshanske avatar dshanske commented on June 16, 2024

Tried the other way of dealing with this.

from syndication-links.

janboddez avatar janboddez commented on June 16, 2024

This works/no longer throws an error.

from syndication-links.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.