Tencent / Biny

Biny is a tiny, high-performance PHP framework for web applications

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Malformed UTF-8 characters, possibly incorrectly encoded

sn01615 opened this issue · comments

        Event::on(onSql); # 加上这句会报错
        $c = chr(rand(0, 255));
        var_dump($c);
        $cc = $this->userDAO->add([
            'title' => $c,
        ], true);
        return $this->correct($cc); # 真正报错的是这一句

非法字符报错:Malformed UTF-8 characters, possibly incorrectly encoded

这个报错应该是非utf-8字符 json_encode失败导致的 注意检查代码