summaryrefslogtreecommitdiff
path: root/ext/standard/file.c
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2006-02-19 04:29:42 +0000
committerAndi Gutmans <andi@php.net>2006-02-19 04:29:42 +0000
commit1efe984d08ccab1d06f062ca157e3bdb2cb7cd57 (patch)
treef12f77325e51b257cb0a8f039ed7568e4ed0fb34 /ext/standard/file.c
parent8f126f33ac87e3bf1432b2a94f27e5f8f47cde9f (diff)
downloadphp-git-1efe984d08ccab1d06f062ca157e3bdb2cb7cd57.tar.gz
- Get rid of using ENFORCE_SAFE_MODE.
Diffstat (limited to 'ext/standard/file.c')
-rw-r--r--ext/standard/file.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/ext/standard/file.c b/ext/standard/file.c
index 81bd0f2b77..c9bf705a7d 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -379,7 +379,7 @@ PHP_FUNCTION(get_meta_tags)
}
md.stream = php_stream_open_wrapper(filename, "rb",
- (use_include_path ? USE_PATH : 0) | ENFORCE_SAFE_MODE | REPORT_ERRORS,
+ (use_include_path ? USE_PATH : 0) | REPORT_ERRORS,
NULL);
if (!md.stream) {
@@ -531,7 +531,7 @@ PHP_FUNCTION(file_get_contents)
context = php_stream_context_from_zval(zcontext, 0);
stream = php_stream_open_wrapper_ex(filename, "rb",
- (use_include_path ? USE_PATH : 0) | ENFORCE_SAFE_MODE | REPORT_ERRORS,
+ (use_include_path ? USE_PATH : 0) | REPORT_ERRORS,
NULL, context);
if (!stream) {
RETURN_FALSE;
@@ -592,7 +592,7 @@ PHP_FUNCTION(file_put_contents)
mode[1] = 't';
}
stream = php_stream_open_wrapper_ex(filename, mode,
- ((flags & PHP_FILE_USE_INCLUDE_PATH) ? USE_PATH : 0) | ENFORCE_SAFE_MODE | REPORT_ERRORS, NULL, context);
+ ((flags & PHP_FILE_USE_INCLUDE_PATH) ? USE_PATH : 0) | REPORT_ERRORS, NULL, context);
if (stream == NULL) {
RETURN_FALSE;
}
@@ -751,7 +751,7 @@ PHP_FUNCTION(file)
context = php_stream_context_from_zval(zcontext, flags & PHP_FILE_NO_DEFAULT_CONTEXT);
- stream = php_stream_open_wrapper_ex(filename, "rb", (use_include_path ? USE_PATH : 0) | ENFORCE_SAFE_MODE | REPORT_ERRORS, NULL, context);
+ stream = php_stream_open_wrapper_ex(filename, "rb", (use_include_path ? USE_PATH : 0) | REPORT_ERRORS, NULL, context);
if (!stream) {
RETURN_FALSE;
}
@@ -893,7 +893,7 @@ PHP_NAMED_FUNCTION(php_if_fopen)
context = php_stream_context_from_zval(zcontext, 0);
- stream = php_stream_open_wrapper_ex(filename, mode, (use_include_path ? USE_PATH : 0) | ENFORCE_SAFE_MODE | REPORT_ERRORS, NULL, context);
+ stream = php_stream_open_wrapper_ex(filename, mode, (use_include_path ? USE_PATH : 0) | REPORT_ERRORS, NULL, context);
if (stream == NULL) {
RETURN_FALSE;
}
@@ -1491,7 +1491,7 @@ PHP_FUNCTION(readfile)
context = php_stream_context_from_zval(zcontext, 0);
- stream = php_stream_open_wrapper_ex(filename, "rb", (use_include_path ? USE_PATH : 0) | ENFORCE_SAFE_MODE | REPORT_ERRORS, NULL, context);
+ stream = php_stream_open_wrapper_ex(filename, "rb", (use_include_path ? USE_PATH : 0) | REPORT_ERRORS, NULL, context);
if (stream) {
size = php_stream_passthru(stream);
php_stream_close(stream);
@@ -1612,7 +1612,7 @@ PHP_FUNCTION(unlink)
php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s does not allow unlinking", wrapper->wops->label ? wrapper->wops->label : "Wrapper");
RETURN_FALSE;
}
- RETURN_BOOL(wrapper->wops->unlink(wrapper, filename, ENFORCE_SAFE_MODE | REPORT_ERRORS, context TSRMLS_CC));
+ RETURN_BOOL(wrapper->wops->unlink(wrapper, filename, REPORT_ERRORS, context TSRMLS_CC));
}
/* }}} */
@@ -1817,7 +1817,7 @@ safe_to_copy:
return ret;
}
- deststream = php_stream_open_wrapper(dest, "wb", ENFORCE_SAFE_MODE | REPORT_ERRORS, NULL);
+ deststream = php_stream_open_wrapper(dest, "wb", REPORT_ERRORS, NULL);
if (srcstream && deststream) {
ret = php_stream_copy_to_stream(srcstream, deststream, PHP_STREAM_COPY_ALL) == 0 ? FAILURE : SUCCESS;