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

Use try catch instead of isempty() to check if variable exists #326

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sameehj
Copy link

@sameehj sameehj commented Aug 8, 2021

If DisplayName doesn't exist for some reason we might get the following
error [0].

Simply use try catch to store the name.

[0] - Unrecongnized field name "DisplayName".

Signed-off-by: Sameeh Jubran [email protected]

If DisplayName doesn't exist for some reason we might get the following
error [0].

Simply use try catch to store the name.

[0] - Unrecongnized field name "DisplayName".

Signed-off-by: Sameeh Jubran <[email protected]>
Copy link
Contributor

@harshpurwar harshpurwar left a comment

Choose a reason for hiding this comment

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

Good for me. I think a lot more files will need similar changes. All of us need to keep this in mind and change it when we come across such an if-else statement to try-catch.

@gilbertogalvis
Copy link
Contributor

Hi @sameehj! This PR fix the issue #280?

I fixed that issue 2 days ago.

Can you please clarify us what issue is fixed with this PR? Thanks!

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.

3 participants