summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatoliy Belsky <ab@php.net>2012-05-10 15:36:47 +0200
committerAnatoliy Belsky <ab@php.net>2012-05-10 15:36:47 +0200
commit10d5f2301a463a719f3b4289625bd280e69ae54c (patch)
treebda39b19e283c07af5c9f85afd28eda0c169cedc
parentf76d7be8764787899f5d776fee967570659132a1 (diff)
parentf7d8b274c7affabd3158075ff1feec45e2cdf56f (diff)
downloadphp-git-10d5f2301a463a719f3b4289625bd280e69ae54c.tar.gz
Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3: Fix bug ext\standard\tests\file\realpath_cache_win32.phpt fails
-rw-r--r--ext/standard/filestat.c7
-rw-r--r--ext/standard/tests/file/realpath_cache.phpt2
-rw-r--r--ext/standard/tests/file/realpath_cache_win32.phpt2
3 files changed, 8 insertions, 3 deletions
diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c
index bfe1abd011..142ca9bdcf 100644
--- a/ext/standard/filestat.c
+++ b/ext/standard/filestat.c
@@ -1208,7 +1208,12 @@ PHP_FUNCTION(realpath_cache_get)
MAKE_STD_ZVAL(entry);
array_init(entry);
- add_assoc_long(entry, "key", bucket->key);
+ /* bucket->key is unsigned long */
+ if (LONG_MAX >= bucket->key) {
+ add_assoc_long(entry, "key", bucket->key);
+ } else {
+ add_assoc_double(entry, "key", (double)bucket->key);
+ }
add_assoc_bool(entry, "is_dir", bucket->is_dir);
add_assoc_stringl(entry, "realpath", bucket->realpath, bucket->realpath_len, 1);
add_assoc_long(entry, "expires", bucket->expires);
diff --git a/ext/standard/tests/file/realpath_cache.phpt b/ext/standard/tests/file/realpath_cache.phpt
index a476063d66..92d6fc5b2a 100644
--- a/ext/standard/tests/file/realpath_cache.phpt
+++ b/ext/standard/tests/file/realpath_cache.phpt
@@ -19,7 +19,7 @@ echo "Done\n";
int(%d)
array(4) {
["key"]=>
- int(%i)
+ %s(%d)
["is_dir"]=>
bool(true)
["realpath"]=>
diff --git a/ext/standard/tests/file/realpath_cache_win32.phpt b/ext/standard/tests/file/realpath_cache_win32.phpt
index 16fc412b09..a4c663f6d1 100644
--- a/ext/standard/tests/file/realpath_cache_win32.phpt
+++ b/ext/standard/tests/file/realpath_cache_win32.phpt
@@ -19,7 +19,7 @@ echo "Done\n";
int(%d)
array(8) {
["key"]=>
- int(%d)
+ %s(%d)
["is_dir"]=>
bool(true)
["realpath"]=>