Skip to content

Commit 81dcd62

Browse files
author
Jan Lehnardt
committed
- seperate registered streams.
#read: make sebastian happy ;)
1 parent 7a7497e commit 81dcd62

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

ext/standard/info.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -376,14 +376,16 @@ PHPAPI void php_print_info(int flag TSRMLS_DC)
376376
zend_hash_get_current_key_ex(url_stream_wrappers_hash, &stream_protocol, &stream_protocol_len, NULL, 0, NULL) == HASH_KEY_IS_STRING;
377377
zend_hash_move_forward(url_stream_wrappers_hash)) {
378378
if (NULL == (stream_protocols_buf = erealloc(stream_protocols_buf,
379-
stream_protocols_buf_len + stream_protocol_len + 1 /* "\n" */ + 1 /* 0 byte at end */))) {
379+
stream_protocols_buf_len + stream_protocol_len + 2 /* ", " */ + 1 /* 0 byte at end */))) {
380380
break;
381381
}
382382
memcpy(stream_protocols_buf + stream_protocols_buf_len, stream_protocol, stream_protocol_len);
383-
stream_protocols_buf[stream_protocols_buf_len + stream_protocol_len] = ' ';
384-
stream_protocols_buf_len += stream_protocol_len + 1;
383+
stream_protocols_buf[stream_protocols_buf_len + stream_protocol_len] = ',';
384+
stream_protocols_buf[stream_protocols_buf_len + stream_protocol_len + 1] = ' ';
385+
stream_protocols_buf_len += stream_protocol_len + 2;
385386
}
386387
if (stream_protocols_buf) {
388+
stream_protocols_buf[stream_protocols_buf_len - 2] = ' ';
387389
stream_protocols_buf[stream_protocols_buf_len] = 0;
388390
php_info_print_table_row(2, "Registered PHP Streams", stream_protocols_buf);
389391
efree(stream_protocols_buf);

0 commit comments

Comments
 (0)