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

Bug:: Transfer log has errors if Character was Deleted #314

Merged
merged 2 commits into from
May 23, 2022

Conversation

AW0005
Copy link
Contributor

@AW0005 AW0005 commented May 22, 2022

This fixes an issue where the Transfer Log will no longer load up and gives an error
"Trying to get property 'url' of non-object" if a character that had been in a transfer was later deleted (and therefore no longer exists to pull information from).

I hide the thumbnail entirely if the character doesn't exist and swap out the h3 content with "Character Deleted".

@itinerare itinerare added bug Something isn't working needs review Pull requests that are pending community review labels May 22, 2022
Copy link
Collaborator

@itinerare itinerare left a comment

Choose a reason for hiding this comment

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

This broadly looks good! Might be worth tidying up just slightly, iirc the isset isn't strictly required...? since it should simply fail if there's no object at the other end even without it.

resources/views/home/_transfer.blade.php Outdated Show resolved Hide resolved
resources/views/home/_transfer.blade.php Outdated Show resolved Hide resolved
@AW0005
Copy link
Contributor Author

AW0005 commented May 23, 2022

@itinerare
You're right! I've had php complain at me in certain cases when I didn't use isset, so I've ended up opting to use it more often than not as a safeguard.

I cleaned it up, and made sure to cover the other _transfer template since there's two of them, and they could both run into the error as it turns out.

@itinerare
Copy link
Collaborator

Oh yeah definitely you need it a good amount of times-- just not here!
Sounds good, definitely like to cover all bases.

@itinerare itinerare added reviewed Pull requests that have received community review and are pending merge and removed needs review Pull requests that are pending community review labels May 23, 2022
@itinerare itinerare merged commit 65c26d4 into corowne:develop May 23, 2022
@AW0005 AW0005 deleted the bug-transfer-log-character-deleted branch June 22, 2022 19:06
@itinerare itinerare linked an issue Dec 6, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working reviewed Pull requests that have received community review and are pending merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

500 error when character in transfer is deleted
4 participants