Skip to content

Doesn't play well with mbstring plugin with mbstring.func_overload ini set #53

Description

@fission1110

If the mbstring.func_overload ini setting is set to & 2, it will overload the strlen function to mb_strlen, which causes problems when using it to count the number of bytes.

Causing: strlen(hextobin("c708")) === 1

It may be helpful to wrap all strlen calls in a function that checks for this ini setting, and if it's set, use
mb_strlen($str, '8bit') instead just to reduce headaches in environments where this is on.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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