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

Issue with API - Unable to destroy DID #633

Open
Lampard11 opened this issue Jun 4, 2023 · 1 comment
Open

Issue with API - Unable to destroy DID #633

Lampard11 opened this issue Jun 4, 2023 · 1 comment

Comments

@Lampard11
Copy link

$result = $magnusBilling->destroy('did', '20');
print_r($result);

Where "20" is the valid ID of DID.
Getting the following error:
Internal Server Error
Illegal string offset 'id'

An internal error occurred while the Web server was processing your request. Please contact the webmaster to report this problem.

Thank you.

@adriankubinyete
Copy link

adriankubinyete commented Feb 27, 2024

Hello.

I actually hit the same issue recently, and found its solution: theres a typo on "/var/www/html/mbilling/protected/controllers/DidController.php", in line 464, where "$value['id']" should be "$values['id']". Quickly changing it and testing solved the issue.
This typo apparently comes from the repository, so I opened a Pull Request for that simple fix.

Curiously, checking the request that a DID Destroy via Web sends, it seems to be the same we send via API, and it simply works! I must be missing something lol.

Anyways, edit that manually and you should be good to go!

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