Skip to content

Do not use php objects in a JS environment! | [Deprecated] Attribution Reporting is deprecated and will be removed. #98

@inilim

Description

@inilim

The Chrome browser issues a warning that when I call fetch(), I am using an outdated attribute.

I don't actually use it.
After studying php-wasm a bit, I realized that php arrays in js don't work, but if you convert them to a \stdClass object, then everything is fine.

But a little later, I noticed a warning in the browser.

The problem is that if you give fetch(url, php_object), the browser issues a warning, but if you convert the object to js_object, the error disappears.

I can assume that proxying php_object into the js environment has artifacts.

Image Image

The warning disappears if you convert to a js object.

Image
    ['jsonToJsObject'](json:string){
        let value:any;
        try{
            value = JSON.parse(json);
        }catch(e: unknown){
            return null;
        }
        return value;
    }

php-wasm@0.0.8

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