ezimuel/zf2 — comment on commit 8aead89859ada5f057333e7691fb1e01ae0be61a
File: library/Zend/Config/Writer/AbstractWriter.php line 56
By DASPRiD:

Skip the empty($filename) and isDir($filename) checks. Instead, just check for is_file() and is_writable().