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

Fatal error: Call to a member function getStock() on a non-object in Mplusqapiclient.php on line 605 #3

Open
dswmedia opened this issue Feb 19, 2016 · 0 comments

Comments

@dswmedia
Copy link

I am using the following code like suggested on the development portal:

// Then we initialize the variables
$branchNumber = 1;
$articleNumbers = 4542;
$amountChanged = -3;

// Then we call the getStock() function wrapped in a try/catch block to intercept any exceptions.
try {
if (false !== $mplusqapiclient->updateStock($branchNumber, $articleNumber, $amountChanged)) {
exit('Stock succesfully updated.');
} else {
exit('Unable to update stock.');
}
} catch (MplusQAPIException $e) {
exit($e->getMessage());
}

This results in:

Fatal error: Call to a member function getStock() on a non-object in Mplusqapiclient.php on line 605

Yes I am sure that i am using the right articleNumber.

Also there is a typo on the $articleNumbers vs $articleNumber

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