diff options
Diffstat (limited to 'ext/bz2')
-rw-r--r-- | ext/bz2/bz2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/bz2/bz2.c b/ext/bz2/bz2.c index eb9f4bc5ac..6b2a5cee06 100644 --- a/ext/bz2/bz2.c +++ b/ext/bz2/bz2.c @@ -205,7 +205,7 @@ PHP_BZ2_API php_stream *_php_stream_bz2open(php_stream_wrapper *wrapper, if (strncasecmp("compress.bzip2://", path, 17) == 0) { path += 17; } - if (mode[0] != 'w' && mode[0] != 'r' && mode[1] != '\0') { + if (mode[0] == '\0' || (mode[0] != 'w' && mode[0] != 'r' && mode[1] != '\0')) { return NULL; } |