]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-5.5' into PHP-5.6
authorStanislav Malyshev <stas@php.net>
Sun, 20 Apr 2014 22:26:51 +0000 (15:26 -0700)
committerStanislav Malyshev <stas@php.net>
Sun, 20 Apr 2014 22:27:39 +0000 (15:27 -0700)
* PHP-5.5:
  Fix bug #65701: Do not use cache for file file copy

1  2 
NEWS
ext/standard/file.c
main/php_streams.h
main/streams/streams.c

diff --cc NEWS
index f0316ee6e774d2f5d9a5c95c210e696473bbe896,85ebf26dda618eaba951ce256cb44352799dbe76..e0503fb3efd723fce84beaa5881eed5d84891180
--- 1/NEWS
--- 2/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).
  - 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).
Simple merge
Simple merge
index 9f9661dbfdecccb26749b9222b1001f7b97085b5,53e37ebe3b9991788354f058dea7412ea268f509..67a151014d6a22ebd44985a1b88ce9d86e5667ac
@@@ -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;
+                       }
                }
        }