diff options
| author | Ondřej Surý <ondrej@sury.org> | 2010-10-21 08:52:46 +0200 |
|---|---|---|
| committer | Ondřej Surý <ondrej@sury.org> | 2010-10-21 08:52:46 +0200 |
| commit | 01fcdff3849c3691d9aaeaab735846ab6d8895ca (patch) | |
| tree | 6460876d356113fa7053df36f2aa00baa7db24a9 /ext/spl/php_spl.c | |
| parent | 855a09f4eded707941180c9d90acd17c25e29447 (diff) | |
| download | php-upstream/5.3.3.tar.gz | |
Imported Upstream version 5.3.3upstream/5.3.3
Diffstat (limited to 'ext/spl/php_spl.c')
| -rwxr-xr-x | ext/spl/php_spl.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/ext/spl/php_spl.c b/ext/spl/php_spl.c index 8a7d6f32e..58bf883f0 100755 --- a/ext/spl/php_spl.c +++ b/ext/spl/php_spl.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_spl.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: php_spl.c 300176 2010-06-04 00:10:15Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -231,6 +231,17 @@ static int spl_autoload(const char *class_name, const char * lc_name, int class_ class_file_len = spprintf(&class_file, 0, "%s%s", lc_name, file_extension); +#if DEFAULT_SLASH != '\\' + { + char *ptr = class_file; + char *end = ptr + class_file_len; + + while ((ptr = memchr(ptr, '\\', (end - ptr))) != NULL) { + *ptr = DEFAULT_SLASH; + } + } +#endif + ret = php_stream_open_for_zend_ex(class_file, &file_handle, ENFORCE_SAFE_MODE|USE_PATH|STREAM_OPEN_FOR_INCLUDE TSRMLS_CC); if (ret == SUCCESS) { |
