--- embedaddon/php/ext/standard/filestat.c 2012/05/29 12:34:43 1.1.1.2 +++ embedaddon/php/ext/standard/filestat.c 2013/07/22 01:32:05 1.1.1.3 @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2012 The PHP Group | + | Copyright (c) 1997-2013 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: filestat.c,v 1.1.1.2 2012/05/29 12:34:43 misho Exp $ */ +/* $Id: filestat.c,v 1.1.1.3 2013/07/22 01:32:05 misho Exp $ */ #include "php.h" #include "fopen_wrappers.h" @@ -904,7 +904,7 @@ PHPAPI void php_stat(const char *filename, php_stat_le } if (php_stream_stat_path_ex((char *)filename, flags, &ssb, NULL)) { - /* Error Occured */ + /* Error Occurred */ if (!IS_EXISTS_CHECK(type)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "%sstat failed for %s", IS_LINK_OPERATION(type) ? "L" : "", filename); } @@ -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);