wez             Sun Feb  6 18:05:31 2005 EDT

  Modified files:              
    /php-src/ext/standard       file.c 
  Log:
  support sucking data from streams in file_put_contents()
  
  
http://cvs.php.net/diff.php/php-src/ext/standard/file.c?r1=1.395&r2=1.396&ty=u
Index: php-src/ext/standard/file.c
diff -u php-src/ext/standard/file.c:1.395 php-src/ext/standard/file.c:1.396
--- php-src/ext/standard/file.c:1.395   Sun Dec 12 18:21:53 2004
+++ php-src/ext/standard/file.c Sun Feb  6 18:05:24 2005
@@ -21,7 +21,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: file.c,v 1.395 2004/12/12 23:21:53 wez Exp $ */
+/* $Id: file.c,v 1.396 2005/02/06 23:05:24 wez Exp $ */
 
 /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
 
@@ -586,6 +586,15 @@
                RETURN_FALSE;
        }
        switch (Z_TYPE_P(data)) {
+               case IS_RESOURCE:
+               {
+                       php_stream *srcstream;
+                       php_stream_from_zval(srcstream, &data);
+
+                       numbytes = php_stream_copy_to_stream(srcstream, stream, 
PHP_STREAM_COPY_ALL);
+
+                       break;
+               }
                case IS_NULL:
                case IS_LONG:
                case IS_DOUBLE:

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

Reply via email to