WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
This repository was archived by the owner on Jan 7, 2025. It is now read-only.
This repository was archived by the owner on Jan 7, 2025. It is now read-only.

Malformed UTF-8 characters error when a QueryException is thrown #14

@AmirrezaNasiri

Description

@AmirrezaNasiri

I've faced the same problem described here and here (but that package has been abandoned).

The problem occurs because the exception can't be formatted to normal JSON data since it contains binary. The problem can be solved by doing these changes in illuminate\database\QueryException.php:

$this->message = $this->formatMessage($sql, $bindings, $previous);

To:

$this->message = utf8_encode($this->formatMessage($sql, $bindings, $previous));

But it's defiantly not a good idea. Any idea about solving it?

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