diff options
author | Wez Furlong <wez@php.net> | 2002-08-11 10:53:10 +0000 |
---|---|---|
committer | Wez Furlong <wez@php.net> | 2002-08-11 10:53:10 +0000 |
commit | 5a21ab42cb0a7b4d0bc5661a6ae7d6ac085ed800 (patch) | |
tree | 8823280330d44c1cf243ea9709996341b6143439 /main/php_streams.h | |
parent | 1861f1bae38472d7927d114a99d74ab40cd0eeee (diff) | |
download | php-git-5a21ab42cb0a7b4d0bc5661a6ae7d6ac085ed800.tar.gz |
Introduce an error stack for wrappers, to help prevent multiple errors
and warnings (some of which are bogus) when there are problems opening
streams.
Implement sanity check on the mode used to open ftp and http connections.
This fixes Bug 12004.
Diffstat (limited to 'main/php_streams.h')
-rwxr-xr-x | main/php_streams.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/main/php_streams.h b/main/php_streams.h index d50b8135c4..160d733931 100755 --- a/main/php_streams.h +++ b/main/php_streams.h @@ -169,8 +169,15 @@ struct _php_stream_wrapper { php_stream_wrapper_ops *wops; /* operations the wrapper can perform */ void *abstract; /* context for the wrapper */ int is_url; /* so that PG(allow_url_fopen) can be respected */ + + /* support for wrappers to return (multiple) error messages to the stream opener */ + int err_count; + char **err_stack; }; +/* pushes an error message onto the stack for a wrapper instance */ +PHPAPI void php_stream_wrapper_log_error(php_stream_wrapper *wrapper, int options TSRMLS_DC, const char *fmt, ...); + struct _php_stream { php_stream_ops *ops; void *abstract; /* convenience pointer for abstraction */ |