Skip to content

Fix deviations with missing image data causing crash#5

Merged
jamesl1001 merged 1 commit intomasterfrom
handle-missing-image-content
Apr 22, 2024
Merged

Fix deviations with missing image data causing crash#5
jamesl1001 merged 1 commit intomasterfrom
handle-missing-image-content

Conversation

@jamesl1001
Copy link
Copy Markdown
Owner

This fix should resolve #4; specifically #4 (comment)

@Ry3yr can you please test this fix and let me know if it works?

@Ry3yr
Copy link
Copy Markdown

Ry3yr commented Apr 14, 2024

If you mean the "null" fix:
#4 (comment)

It is not yet fixing the issue as I remarked earlier

(However it is good to know that "no image data" submissions cause the failure

@jamesl1001
Copy link
Copy Markdown
Owner Author

jamesl1001 commented Apr 15, 2024

No, I mean the changes in this pull request

Try to copy these changes into your getDeviations.php file and see if that resolves the issue:
fb03ff1?diff=unified&w=0#diff-f724c0063c3e3019e48fee40dd994cebb5f311c91aae7a08a35bc2ff7ad84b15

Otherwise, if you're still getting an error, please share it here.

@Ry3yr
Copy link
Copy Markdown

Ry3yr commented Apr 16, 2024

Still having an error sadly:
[16-Apr-2024 15:07:27 UTC] PHP Fatal error: Uncaught Error: Call to a member function attributes() on null in /home/alceawis/public_html/PHP/0demo/2023-12-10-Parse-DA-Gallery-images/deviantART-API/getDeviations.php:23
Stack trace:
#0 /home/alceawis/public_html/PHP/0demo/2023-12-10-Parse-DA-Gallery-images/deviantART-API/fetch.php(16): getDeviations()
#1 {main}
thrown in /home/alceawis/public_html/PHP/0demo/2023-12-10-Parse-DA-Gallery-images/deviantART-API/getDeviations.php on line 23

Download (1)

Is the null really enough to catch entries without image data ?
Maybe a preliminary check should be enacted prior fetch ?

@jamesl1001
Copy link
Copy Markdown
Owner Author

You now have duplicated thumbS, thumbL and image keys. Delete the first (yellow) set.

322899601-b8c4afdb-418c-4209-aa0c-800f77fd71e0

@Ry3yr
Copy link
Copy Markdown

Ry3yr commented Apr 22, 2024

Perfect!

Seems to work now 😻
Download (1)

@jamesl1001
Copy link
Copy Markdown
Owner Author

Great, thanks for testing!

@jamesl1001 jamesl1001 merged commit db91923 into master Apr 22, 2024
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.

Unclear instruction in gallery nr

2 participants