com php-src: Merge branch 'PHP-5.5' into PHP-5.6: NEWS ext/standard/file.c main/php_streams.h main/streams/streams.c
| From: | Stanislav Malyshev | Date: | Sun, 20 Apr 2014 22:27:39 +0000 |
| Subject: | com php-src: Merge branch 'PHP-5.5' into PHP-5.6: NEWS ext/standard/file.c main/php_streams.h main/streams/streams.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-76953@lists.php.net to get a copy of this message | ||
Commit: 774f16318b3739e751d5a041f3601a3cf3000614
Author: Stanislav Malyshev <stas@php.net> Sun, 20 Apr 2014 15:26:51 -0700
Parents: 1bca3ecacc19686d949f55cec410beea40491685 5addf223d597c56638a34f9ef0061d454e748abe
Branches: PHP-5.6 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=774f16318b3739e751d5a041f3601a3cf3000614
Log:
Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
Fix bug #65701: Do not use cache for file file copy
Bugs:
https://bugs.php..net/65701
Changed paths:
MM NEWS
MM ext/standard/file.c
MM main/php_streams.h
MM main/streams/streams.c
Diff:
diff --cc NEWS
index f0316ee,85ebf26..e0503fb
--- a/NEWS
+++ b/NEWS
@@@ -6,18 -6,26 +6,21 @@@ PH
. Fixed bug #67079 (Missing MIME types for XML/XSL files). (Anatol)
- Core:
- . Fixed bug #65701 (copy() doesn't work when destination filename is created
- by tempnam()). (Boro Sitnikovski)
- . Fixed bug #67072 (Echoing unserialized "SplFileObject" crash). (Anatol)
-
-- DOM:
- . Fixed bug #67081 (DOMDocumentType->internalSubset returns entire DOCTYPE tag,
- not only the subset). (Anatol)
-
-?? ??? 2014, PHP 5.5.12
-- Core:
- . Fixed bug #61019 (Out of memory on command stream_get_contents). (Mike)
- . Fixed bug #64330 (stream_socket_server() creates wrong Abstract Namespace
- UNIX sockets). (Mike)
. Fixed bug #64604 (parse_url is inconsistent with specified port).
(Ingo Walz)
- . Fixed bug #66182 (exit in stream filter produces segfault). (Mike)
- . Fixed bug #66736 (fpassthru broken). (Mike)
++ . Fixed bug #65701 (copy() doesn't work when destination filename is created
++ by tempnam()). (Boro Sitnikovski)
+ . Fixed bug #66015 (Unexpected array indexing in class's static property). (Bob)
+ . Added (constant) string/array dereferencing to static scalar expressions
+ to complete the set; now possible thanks to bug #66015 being fixed. (Bob)
+ . Fixed bug #66568 (Update reflection information for unserialize() function).
+ (Ferenc)
+ . Fixed bug #66660 (Composer.phar install/update fails). (Ferenc)
. Fixed bug #67024 (getimagesize should recognize BMP files with negative
height). (Gabor Buella)
- . Fixed bug #67043 (substr_compare broke by previous change) (Tjerk)
+ . Fixed bug #67064 (Countable interface prevents using 2nd parameter
+ ($mode) of count() function). (Bob)
++ . Fixed bug #67072 (Echoing unserialized "SplFileObject" crash). (Anatol)
- cURL:
. Fixed bug #66562 (curl_exec returns differently than curl_multi_getcontent).
@@@ -59,9 -67,10 +62,6 @@@
- SQLite:
. Fixed bug #66967 (Updated bundled libsqlite to 3.8.4.3). (Anatol)
- - Standard:
- . Fixed bug #67072 (Echoing unserialized "SplFileObject" crash). (Anatol)
-- XSL:
- . Fixed bug #53965 (<xsl:include> cannot find files with relative paths
- when loaded with "file://"). (Anatol)
--
- Apache2 Handler SAPI:
. Fixed Apache log issue caused by APR's lack of support for %zu
(APR issue https://issues.apache.org/bugzilla/show_bug.cgi?id=56120).
diff --cc main/streams/streams.c
index 9f9661d,53e37eb..67a1510
--- a/main/streams/streams.c
+++ b/main/streams/streams.c
@@@ -1918,22 -1918,24 +1918,24 @@@ PHPAPI int _php_stream_rmdir(const cha
/* }}} */
/* {{{ _php_stream_stat_path */
-PHPAPI int _php_stream_stat_path(char *path, int flags, php_stream_statbuf *ssb,
php_stream_context *context TSRMLS_DC)
+PHPAPI int _php_stream_stat_path(const char *path, int flags, php_stream_statbuf *ssb,
php_stream_context *context TSRMLS_DC)
{
php_stream_wrapper *wrapper = NULL;
- char *path_to_open = path;
+ const char *path_to_open = path;
int ret;
- /* Try to hit the cache first */
- if (flags & PHP_STREAM_URL_STAT_LINK) {
- if (BG(CurrentLStatFile) && strcmp(path, BG(CurrentLStatFile)) == 0) {
- memcpy(ssb, &BG(lssb), sizeof(php_stream_statbuf));
- return 0;
- }
- } else {
- if (BG(CurrentStatFile) && strcmp(path, BG(CurrentStatFile)) == 0) {
- memcpy(ssb, &BG(ssb), sizeof(php_stream_statbuf));
- return 0;
+ if (!(flags & PHP_STREAM_URL_STAT_NOCACHE)) {
+ /* Try to hit the cache first */
+ if (flags & PHP_STREAM_URL_STAT_LINK) {
+ if (BG(CurrentLStatFile) && strcmp(path, BG(CurrentLStatFile)) == 0) {
+ memcpy(ssb, &BG(lssb), sizeof(php_stream_statbuf));
+ return 0;
+ }
+ } else {
+ if (BG(CurrentStatFile) && strcmp(path, BG(CurrentStatFile)) == 0) {
+ memcpy(ssb, &BG(ssb), sizeof(php_stream_statbuf));
+ return 0;
+ }
}
}