Tencent / Biny

Biny is a tiny, high-performance PHP framework for web applications
BSD 3-Clause "New" or "Revised" License
1.69k stars 259 forks source link

Malformed UTF-8 characters, possibly incorrectly encoded #87

Closed sn01615 closed 5 years ago

sn01615 commented 5 years ago
        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

billge1205 commented 5 years ago

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