woothemes/woocommerce — pull request #5555 by toddlahman (2014-05-25 21:12:11+00:00)
Title: Confirm buffer is not empty before erasing

Confirm file_exists before opening. For PHP 5.3 or earlier, check if
safe_mode is active to avoid errors.