magnusbilling7 icon indicating copy to clipboard operation
magnusbilling7 copied to clipboard

Issue with API - Unable to destroy DID

Open Lampard11 opened this issue 2 years ago • 1 comments
trafficstars

$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.

Lampard11 avatar Jun 04 '23 18:06 Lampard11

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!

adriankubinyete avatar Feb 27 '24 20:02 adriankubinyete