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

Feature: json error #1

Closed
sarrala opened this issue Feb 20, 2015 · 2 comments
Closed

Feature: json error #1

sarrala opened this issue Feb 20, 2015 · 2 comments

Comments

@sarrala
Copy link
Contributor

sarrala commented Feb 20, 2015

Would be nice to have something like:

$result = json_encode($response);
if (json_last_error() != JSON_ERROR_NONE) {
    return json_encode(['error' => json_last_error_msg()]);
}
return $result;

@ AjaxView::render

What do you think about it?

@dereuromark
Copy link
Owner

If you can make a pr go for it.

sarrala added a commit to sarrala/cakephp-ajax that referenced this issue Feb 24, 2015
@sarrala
Copy link
Contributor Author

sarrala commented Feb 24, 2015

PR created.

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

No branches or pull requests

2 participants