Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
SDKiller opened this issue Aug 8, 2015 · 2 comments
Labels

Comments

@SDKiller
Copy link

SDKiller commented Aug 8, 2015

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"
@samdark
Copy link
Owner

samdark commented Aug 9, 2015

It's not by design.

@samdark samdark added the bug label Aug 9, 2015
@samdark
Copy link
Owner

samdark commented Aug 26, 2015

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants