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

Bug in sale/order controller. #3164

Closed
hovi opened this issue Jul 5, 2015 · 1 comment
Closed

Bug in sale/order controller. #3164

hovi opened this issue Jul 5, 2015 · 1 comment

Comments

@hovi
Copy link

hovi commented Jul 5, 2015

Hi,

in file admin/controller/sale/order.php, function api(), there are possible paths, that will result in variable $json not set - there is condition at around line 2176:

if (isset($this->session->data['cookie']) && isset($this->request->get['api'])) {

If condition does not apply, $json is never set and thus ajax request fails, because instead of json, result is PHP warning. I suggest adding else branch with setting $json to something, that at least give user hint about problem. I came across this, because I didn't have api user set up after upgrade and it was pain in the ass to find actual reason.

Cheers,

Karel Hovorka

@hovi
Copy link
Author

hovi commented Jul 5, 2015

Nevermind, I see master branch has this file completely refactored.

@hovi hovi closed this as completed Jul 5, 2015
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

1 participant