Page MenuHomePhabricator

Bug in caching thumbs for ForeignAPIRepo
Closed, ResolvedPublic

Description

don't cache non-existent thumbs

There are some issues here with (non-existant) thumbs that it is trying to cache. The attached patch should solve those.


Version: unspecified
Severity: minor

attachment foreignapi_cache.patch ignored as obsolete

Details

Reference
bz22540

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:59 PM
bzimport set Reference to bz22540.

Can you say what issues? There is typo in the patch:

Could not downlaod

Also, don't use assignments inside comparison. In the future please mark patches as text/plain or tick the patch checkbox.

Things like this:

[client ::1] PHP Warning:
file_put_contents(/Users/hartman/Development/phase3/images/thumb/Accordian_chords-01.ogg/):
failed to open stream: Is a directory in
/Users/hartman/Development/phase3/includes/filerepo/ForeignAPIRepo.php on line
210, referer: http://localhost/wiki/index.php?title=Main_Page&action=edit

It tries to store a thumb, even though it hasn't found a thumb to store.

Created attachment 7133
don't cache non-existent thumbs with corrected typo

attachment foreignapi_cache.patch ignored as obsolete

Created attachment 7134
don't cache non-existent thumbs, with corrections

don't use assignments inside comparison.

attachment foreignapi_cache.patch ignored as obsolete

Created attachment 7135
don't cache non-existent thumbs, with corrections

'compile before you submit' ... :/

Attached: