Skip to content

Throw exception instead of getting a php warning #42

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

Merged
merged 3 commits into from
Sep 25, 2020

Conversation

Daemant
Copy link
Contributor

@Daemant Daemant commented Sep 8, 2020

When I accidentally tried to call a loaded, but not started resource on game server, I got a non-handleable invalid argument php warning inside the page body:

Warning: Invalid argument supplied for foreach() in vendor\multitheftauto\mtasa-php-sdk\src\Transformer\ElementTransformer.php on line 34

This will replace it with an exception which can be handled by code

@Daemant Daemant requested a review from a team as a code owner September 8, 2020 11:46
Copy link
Member

@ecastro98 ecastro98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution, I really appreciate it. Sorry for the delay, I was a bit busy lately.

@Daemant
Copy link
Contributor Author

Daemant commented Sep 14, 2020

Yes, I agree that this looks cleaner, so let's apply it.

@ecastro98
Copy link
Member

Thanks @Daemant !

@ecastro98 ecastro98 merged commit f147fdd into multitheftauto:master Sep 25, 2020
ecastro98 added a commit that referenced this pull request Sep 25, 2020
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

Successfully merging this pull request may close these issues.

2 participants