com php-src: Merge branch 'PHP-5.6': ext/spl/spl_directory. c
| From: | JulienPauli | Date: | Fri, 20 Feb 2015 14:40:46 +0000 |
| Subject: | com php-src: Merge branch 'PHP-5.6': ext/spl/spl_directory. c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-85030@lists.php.net to get a copy of this message | ||
Commit: 72af5cda276a661c73b36d31f60ac4d6ddd85b93
Author: Julien Pauli <jpauli@php.net> Fri, 20 Feb 2015 15:40:46 +0100
Parents: b97a9a80980e6ba15998a1286469f088fcc392f0 13c3b78f1e9f6cf5009631e9a1678c9a4bc443d8
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=72af5cda276a661c73b36d31f60ac4d6ddd85b93
Log:
Merge branch 'PHP-5.6'
* PHP-5.6:
fix #68557
Conflicts:
ext/spl/spl_directory.c
Bugs:
https://bugs.php.net/68557
Changed paths:
MM ext/spl/spl_directory.c
Diff:
diff --cc ext/spl/spl_directory.c
index fd5e08e,7cc67d7..9e51626
--- a/ext/spl/spl_directory.c
+++ b/ext/spl/spl_directory.c
@@@ -192,18 -202,21 +192,21 @@@ static inline void spl_filesystem_objec
{
char slash = SPL_HAS_FLAG(intern->flags, SPL_FILE_DIR_UNIXPATHS) ? '/' :
DEFAULT_SLASH;
- if (!intern->file_name) {
- switch (intern->type) {
+ switch (intern->type) {
case SPL_FS_INFO:
case SPL_FS_FILE:
- php_error_docref(NULL, E_ERROR, "Object not initialized");
+ if (!intern->file_name) {
- php_error_docref(NULL TSRMLS_CC, E_ERROR, "Object not initialized");
++ php_error_docref(NULL, E_ERROR, "Object not initialized");
+ }
break;
case SPL_FS_DIR:
+ if (intern->file_name) {
+ efree(intern->file_name);
+ }
- intern->file_name_len = spprintf(&intern->file_name, 0, "%s%c%s",
- spl_filesystem_object_get_path(intern, NULL TSRMLS_CC),
+ intern->file_name_len = (int)spprintf(&intern->file_name, 0, "%s%c%s",
+ spl_filesystem_object_get_path(intern, NULL),
slash, intern->u.dir.entry.d_name);
break;
- }
}
} /* }}} */