summaryrefslogtreecommitdiff
path: root/ext/standard/filestat.c
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 /ext/standard/filestat.c
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
Diffstat (limited to 'ext/standard/filestat.c')
-rw-r--r--ext/standard/filestat.c7
1 files changed, 6 insertions, 1 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);