OSDN Git Service

Handle error caused by reading empty file
authorgoldenapples <goldenapplesdesign@gmail.com>
Wed, 13 Feb 2013 19:23:45 +0000 (11:23 -0800)
committergoldenapples <goldenapplesdesign@gmail.com>
Wed, 13 Feb 2013 19:23:45 +0000 (11:23 -0800)
commitb295e89e57fce49d04e83a4d559fa51abd3f43e8
treeb10206ee7277710a5139947949c4bb7a3bf8e838
parent4d3fcccebc36a20115ad927dd83aef0b6ef5cbdd
Handle error caused by reading empty file

`fread()` will throw an error if trying to read an empty file (ie if
user deleted all post content or quit the editor on `wp post create`.
Detect that and fail gracefully.
php/utils.php