]> granicus.if.org Git - php/commitdiff
MFB51: Only report mkdir() errors if error reporting option is set.
authorIlia Alshanetsky <iliaa@php.net>
Tue, 17 Jan 2006 02:32:34 +0000 (02:32 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Tue, 17 Jan 2006 02:32:34 +0000 (02:32 +0000)
main/streams/plain_wrapper.c

index f05283fe3b3d3a00aa42cef54fb004c983fdb417..ac5ad825dbb578049ba0bcf5d71280e8b21e50ce 100644 (file)
@@ -1120,7 +1120,9 @@ static int php_plain_files_mkdir(php_stream_wrapper *wrapper, char *dir, int mod
                                if (*p == '\0' && *(p + 1) != '\0') {
                                        *p = DEFAULT_SLASH;
                                        if ((ret = VCWD_MKDIR(buf, (mode_t)mode)) < 0) {
-                                               php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", strerror(errno));
+                                               if (options & REPORT_ERRORS) {
+                                                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", strerror(errno));
+                                               }
                                                break;
                                        }
                                }