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

method_exists(): Argument #1 ($object_or_class) must be of type object|string, null given #5

Closed
pavelforever opened this issue Oct 8, 2021 · 6 comments

Comments

@pavelforever
Copy link

Hello, time to time I get this error "method_exists(): Argument #1 ($object_or_class) must be of type object|string, null given". Is seems in RequestException somehow fills with null. Here is screenshot
mintty_zrZI0rywYI
.

@zhouaini528
Copy link
Owner

Thank you for your discovery. Did you use PHP version 8?

@pavelforever
Copy link
Author

Thank you for your discovery. Did you use PHP version 8?

Yes, it's PHP 8.0.10

@zhouaini528
Copy link
Owner

I will fix this problem soon. The reason for it is wintercms/winter#207

@zhouaini528
Copy link
Owner

I have fixed. Please composer update to 2.1.8
If you have any other questions, please feel free to contact me

@pavelforever
Copy link
Author

I have fixed. Please composer update to 2.1.8 If you have any other questions, please feel free to contact me

Thank you! As I see now it will throw an Exception if any issue occured in request. Is there a way how I can make several request attempts if issue happened? Now on any problem with request my script dies. Yes, I can wrap up each method in try catch and cycle it through attempts, but maybe there is a universal way to do it?

@zhouaini528
Copy link
Owner

Your application needs a queue mechanism. If there is a script error, you can re-initiate the request at a few seconds to check whether the order is complete.

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