Re: cvs: php-src(PHP_5_3) /ext/standard file.c /main/streams plain_wrapper.c

From: Date: Mon, 12 Nov 2007 22:55:42 +0000
Subject: Re: cvs: php-src(PHP_5_3) /ext/standard file.c /main/streams plain_wrapper.c
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-47129@lists.php.net to get a copy of this message
Hi Ilia,
+ char mode[3] = "wb"; + if (flags & PHP_FILE_APPEND) { + mode[0] = 'a'; + } else if (flags & LOCK_EX) { + mode[0] = 'c';
uhm, I think this assignment isn't needed, as the variable should already contain the '\0' from the initilization above.
+ mode[2] = '\0';
probably you meant == 'c' here
+ if (mode[0] = 'c') { + php_stream_truncate_set_size(stream, 0); + }
Nuno

« previous php.cvs (#47129) next »