Fixed PHP-1085: w=0 can return an unexpected exception on failure
Merge pull request #684 from bjori/PHP-1085-w0-throws-exception

Fixed PHP-1085: w=0 can return an unexpected exception on failure

* bjori/PHP-1085-w0-throws-exception:
  Fixed PHP-1085: w=0 can return an unexpected exception on failure