{"comment":{"created_at":"2011-10-18T17:20:41Z","body":"Hrmm weird, let me test some more.","updated_at":"2011-10-18T17:20:41Z","url":"https://api.github.com/repos/milesj/cake-uploader/issues/comments/2444730","id":2444730,"user":{"gravatar_id":"2bebf4cb2fc99965264410111a0d2239","avatar_url":"https://secure.gravatar.com/avatar/2bebf4cb2fc99965264410111a0d2239?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/milesj","id":143744,"login":"milesj"}},"action":"created","issue":{"number":26,"created_at":"2011-10-05T09:29:28Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"Hi!\r\n\r\nI just upgraded an old app of mine, where the cake-uploader component < 2.6.7 was used. After upgrading I investigated a strange behavior. All uploads were missing after updating an entry.\r\n\r\nI looked deeper in my app code and the changes you made in the uploader-component (especially in the uploader behavior). With the great improvements of 2.6.7 (saved few days of my life :)) the beforeSave-Method changed and breaks existing implementations.\r\n\r\nSo: \r\nThe cake-uploader used to handle empty file uploads correctly in the \"good old times\". Altough there was an empty file upload in the form, the old values didn't get touched. \r\n\r\nNow having an empty file upload in the form overwrites these values. \r\n\r\nI think, that the following line is responsible for that undocumented/accidently change:\r\nhttps://github.com/milesj/cake-uploader/commit/2ff69494c5c334a049c7d76d98afe15f65df8000#L2R199 (In trunk it's line 204)  \r\n\r\nThe is_string Method is also true for an empty string. So I suggest to change this line to:\r\n\r\n```php\r\nif (is_string($file) && !empty($file)) {\r\n```\r\n\r\nOr do you think, that the change you made forces valid behavior?","comments":5,"title":"Problem with empty file uploads","updated_at":"2011-10-18T17:20:41Z","url":"https://api.github.com/repos/milesj/cake-uploader/issues/26","id":1822043,"assignee":null,"milestone":null,"closed_at":null,"user":{"gravatar_id":"c18d4f21c36997f3c7806dff9002dde3","avatar_url":"https://secure.gravatar.com/avatar/c18d4f21c36997f3c7806dff9002dde3?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/johannesnagl","id":610811,"login":"johannesnagl"},"html_url":"https://github.com/milesj/cake-uploader/issues/26","labels":[],"state":"open"},"legacy":{"issue_id":1822043,"comment_id":2444730}}