Skip to content

API issue: Connection#$encoding #20

Description

@DaveRandom

Assigning this can fail. At the moment this can't be easily detected without installing global error handlers (it currently emits an E_NOTICE

php_error(E_NOTICE, "Unrecognized encoding '%s'", zenc->val);
). Notably, it always fails if you attempt to set it before the connection has been established when connecting asynchronously.

As this is something that could contribute to a security issue if it fails, can we throw an exception instead? A failure to set an encoding anywhere should always be handled - or at least handle-able - IMHO.

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