diff options
| -rw-r--r-- | ext/standard/tests/file/stream_rfc2397_006.phpt | 4 | ||||
| -rw-r--r-- | main/streams/memory.c | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/ext/standard/tests/file/stream_rfc2397_006.phpt b/ext/standard/tests/file/stream_rfc2397_006.phpt index e6694a2861..f6616a0c88 100644 --- a/ext/standard/tests/file/stream_rfc2397_006.phpt +++ b/ext/standard/tests/file/stream_rfc2397_006.phpt @@ -26,7 +26,9 @@ NULL Warning: file_get_contents() expects parameter 1 to be a valid path, string given in %s line %d NULL -string(13) "foobar foobar" + +Warning: file_get_contents(data:;base64,#Zm9vYmFyIGZvb2Jhcg==): failed to open stream: rfc2397: unable to decode in %sstream_rfc2397_006.php on line %d +bool(false) Warning: file_get_contents(data:;base64,#Zm9vYmFyIGZvb2Jhc=): failed to open stream: rfc2397: unable to decode in %sstream_rfc2397_006.php on line %d bool(false) diff --git a/main/streams/memory.c b/main/streams/memory.c index afa45c3968..a1af61e3f0 100644 --- a/main/streams/memory.c +++ b/main/streams/memory.c @@ -720,7 +720,7 @@ static php_stream * php_stream_url_wrap_rfc2397(php_stream_wrapper *wrapper, con dlen--; if (base64) { - base64_comma = php_base64_decode((const unsigned char *)comma, dlen); + base64_comma = php_base64_decode_ex((const unsigned char *)comma, dlen, 1); if (!base64_comma) { zval_ptr_dtor(&meta); php_stream_wrapper_log_error(wrapper, options, "rfc2397: unable to decode"); |
