stas            Tue Sep  2 05:17:10 2003 EDT

  Modified files:              (Branch: PHP_4_3)
    /php-src/main       streams.c 
  Log:
  don't report errors if asked not to report
  
  
Index: php-src/main/streams.c
diff -u php-src/main/streams.c:1.125.2.76 php-src/main/streams.c:1.125.2.77
--- php-src/main/streams.c:1.125.2.76   Thu Aug 28 15:18:57 2003
+++ php-src/main/streams.c      Tue Sep  2 05:17:09 2003
@@ -20,7 +20,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: streams.c,v 1.125.2.76 2003/08/28 19:18:57 iliaa Exp $ */
+/* $Id: streams.c,v 1.125.2.77 2003/09/02 09:17:09 stas Exp $ */
 
 #define _GNU_SOURCE
 #include "php.h"
@@ -2462,19 +2462,23 @@
                /* BC with older php scripts and zlib wrapper */
                protocol = "compress.zlib";
                n = 13;
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Use of \"zlib:\" wrapper 
is deprecated; please use \"compress.zlib://\" instead.");
+               if(options & REPORT_ERRRORS) {
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "Use of \"zlib:\" 
wrapper is deprecated; please use \"compress.zlib://\" instead.");
+               }
        }
 
        if (protocol)   {
                if (FAILURE == zend_hash_find(&url_stream_wrappers_hash, 
(char*)protocol, n, (void**)&wrapper)) {
                        char wrapper_name[32];
 
-                       if (n >= sizeof(wrapper_name))
-                               n = sizeof(wrapper_name) - 1;
-                       PHP_STRLCPY(wrapper_name, protocol, sizeof(wrapper_name), n);
+                       if(options & REPORT_ERRRORS) {
+                               if (n >= sizeof(wrapper_name))
+                                       n = sizeof(wrapper_name) - 1;
+                               PHP_STRLCPY(wrapper_name, protocol, 
sizeof(wrapper_name), n);
                        
-                       php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Unable to find the 
wrapper \"%s\" - did you forget to enable it when you configured PHP?",
-                                       wrapper_name);
+                               php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Unable to 
find the wrapper \"%s\" - did you forget to enable it when you configured PHP?",
+                                               wrapper_name);
+                       }
 
                        wrapper = NULL;
                        protocol = NULL;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to