yii2-webshell icon indicating copy to clipboard operation
yii2-webshell copied to clipboard

PHP Warning", message: "json_encode(): Invalid UTF-8 sequence in argument"

Open SDKiller opened this issue 10 years ago • 2 comments

And no error output in window - is this by design?

111111111111111

Another problem - Invalid UTF-8 sequence in argument was caused by stacktrace of exception happened earlier (because of invalid config) and passed to json_encode() - so stacktrace returned in output is actually useless

0: "#0 [internal function]: yii\base\ErrorHandler->handleError(2, 'json_encode(): ...', 'D:\\WebServers\\O...', 39, Array)"
1: "#1 ...\vendor\yiisoft\yii2\helpers\BaseJson.php(39): json_encode(Array, 320)"
2: "#2 ...\vendor\yiisoft\yii2\web\JsonResponseFormatter.php(53): yii\helpers\BaseJson::encode(Array)"
3: "#3 ...\vendor\yiisoft\yii2\web\JsonResponseFormatter.php(41): yii\web\JsonResponseFormatter->formatJson(Object(yii\web\Response))"
4: "#4 ...\vendor\yiisoft\yii2\web\Response.php(939): yii\web\JsonResponseFormatter->format(Object(yii\web\Response))"
5: "#5 ...\vendor\yiisoft\yii2\web\Response.php(310): yii\web\Response->prepare()"
6: "#6 ...\vendor\yiisoft\yii2\base\Application.php(381): yii\web\Response->send()"
7: "#7 ...\index.php(14): yii\base\Application->run()"
8: "#8 {main}"
type: "yii\base\ErrorException"

SDKiller avatar Aug 08 '15 00:08 SDKiller

It's not by design.

samdark avatar Aug 09 '15 22:08 samdark

Could be related to invalid ./yii path. Need to handle it properly.

samdark avatar Aug 26 '15 09:08 samdark