Giter Club home page Giter Club logo

Comments (5)

PHPGangsta avatar PHPGangsta commented on July 20, 2024

I guess you are talking about a "Notice" which is new in PHP 8.0, that occurs if you access an undefined property in a class. You should be able to fix it if you create the class property:

class WebAuthn
{
    /**
     * @var string
     */
    public $appid;
...

from webauthn.

davidearl avatar davidearl commented on July 20, 2024

There is no requirement in any version of PHP to declare properties. They tightened up implicit object creation, and reading unset properties, but there isn't any error, notice or otherwise, in assigning to a new property. I wrote a quick test just to make sure. Adding properties dynamically is very widely used.

I don't really think it is appropriate to use localhost for this, and you really must use https, it's pointless otherwise.

If you could post the actual error with the line numbers, and the exact string you pass in, that would be helpful. It has to match the host in the origin returned in the response later on, but that doesn't sound like the error you're getting.

from webauthn.

PHPGangsta avatar PHPGangsta commented on July 20, 2024

@davidearl If you don't declare properties, in PHP 8.x you get Notices, Warnings when reading. In >=8.2 you'll get Notices when writing to an undeclared property.

In PHP 9 you'll get Errors. Please read:

https://wiki.php.net/rfc/deprecate_dynamic_properties

from webauthn.

davidearl avatar davidearl commented on July 20, 2024

Quite. 8.2 which isn't released yet. Unless @rohitgour45 is using a pre-release 8.2, this is not the problem above: it is only writing. Not saying it wouldn't be good to declare it, but it's not the immediate issue.

from webauthn.

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.