Coder Social home page Coder Social logo

Comments (2)

renky avatar renky commented on September 23, 2024

ok sorry - after shortly thinking about it:
This Function protected function createJsonBody(array $data) doesn't make sense like it is...
In the function it is checked if it is an array or not - but the header already forces the input to be an array... but on the other hand when writing a file, it is usually a string - is there a case where this data is really an array? And how should it be? Is the solution only to remove the "array" from the createJsonBody-Definition? So this solves my problem now, but what did the creator want, when he wrote the function?

from php-lxd.

ashleyhood avatar ashleyhood commented on September 23, 2024

You are right, it shouldn't have a type-hint of array on the createJsonBody or on the data input for post, put or patch methods (just over aggressive type-hinting by me).

I think we could just remove the type-hints and that should solve it.

from php-lxd.

Related Issues (17)

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.