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

Class 'chriskacerguis\RestServer\RecursiveIteratorIterator' not found #1111

Closed
careybaird opened this issue Nov 14, 2020 · 5 comments · Fixed by #1136
Closed

Class 'chriskacerguis\RestServer\RecursiveIteratorIterator' not found #1111

careybaird opened this issue Nov 14, 2020 · 5 comments · Fixed by #1136

Comments

@careybaird
Copy link

Describe the bug
Using the post() method with no variables causes fatal error:

Class 'chriskacerguis\RestServer\RecursiveIteratorIterator' not found

To Reproduce
Try to access the request post using method post() with no variables:

$post = $this->post();

Fatal error will show.

Expected behavior
Expect to receive a full array of post data.

Screenshots / Error Messages
n/a

Environment (please complete the following information):

  • PHP Version: 7.4.x
  • CodeIgniter Version: 3
  • Version: dev-master

Additional context

This just needs a use statement so PHP is not looking in the local namespace for the class. Add the following to line 7 of RestController.php:

use \RecursiveIteratorIterator;
@nullart2
Copy link

Thank you for this.

In my case

Message: Class 'chriskacerguis\RestServer\RecursiveIteratorIterator' not found

adding

use \RecursiveArrayIterator;

solved my issues.

@careybaird
Copy link
Author

@chriskacerguis I can submit a pull request for this if you agree?

@github-actions
Copy link

Stale issue message

@nacho004
Copy link

Anyone could solve this?
The fix doesn't work for me

Thank you for this.

In my case

Message: Class 'chriskacerguis\RestServer\RecursiveIteratorIterator' not found

adding

use \RecursiveArrayIterator;

solved my issues.

@jamieburchell
Copy link
Contributor

@chriskacerguis Please can you merge this fix?

chriskacerguis pushed a commit that referenced this issue Feb 3, 2022
getbigideas pushed a commit to getbigideas/Codeigniter_auth-rest_API that referenced this issue Aug 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants