-
-
Notifications
You must be signed in to change notification settings - Fork 214
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
Add external avatar file check for missing files #5241
Conversation
Aditional check for external linked avatars. Without the code, external linked avatars not available are shown without the default avatar
Thanks for this. Maybe I'm misreading it, but the file_exists() function in PHP does not work with remote URLs, so I'm not sure how this is working for you. ? |
Changed file_exists to fopen, to check if remote file exists
Sorry, im using localhost, so forgot it's a remote url. Just changed file_exists for fopen for remote url checking |
There's something wrong, because the generic avatar is still not rendered on the front end, and i narrow it down to this line in The issue is that the createConstants method renders as the src of avatar image |
Aditional change to make default avatar image render
Add files via upload
…runcate Revert "Add files via upload"
Code Climate has analyzed commit 9fa6f1a and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (80% is the threshold). This pull request will bring the total coverage in the repository to 38.5% (0.0% change). View more on Code Climate. |
Sorry, closing again and reopening another one because i had changes in my main code, not in a branch. Sorry |
Motivation and Context
External avatar files, when missing, give this output:
Description
Added code to revert to default avatar image, when external file is missing, output like this:
How Has This Been Tested?
Tested in e107 v2.3.3 clean install,
Output tested in admin area and in the front end (pics above)
Types of Changes
Checklist