diff options
| author | Melvyn Sopacua <msopacua@php.net> | 2002-11-21 23:28:26 +0000 |
|---|---|---|
| committer | Melvyn Sopacua <msopacua@php.net> | 2002-11-21 23:28:26 +0000 |
| commit | 7732ce7fe332c37430e6fb539a3d64f05cfc38be (patch) | |
| tree | 9e8f54fc9eb3f53c37aed3e7635442176626e0b2 /ext/xslt/sablot.c | |
| parent | 8d42dd7a8bd732245697d2baf22cca62300fb45f (diff) | |
| download | php-git-7732ce7fe332c37430e6fb539a3d64f05cfc38be.tar.gz | |
Fix bug #20518
Diffstat (limited to 'ext/xslt/sablot.c')
| -rw-r--r-- | ext/xslt/sablot.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/ext/xslt/sablot.c b/ext/xslt/sablot.c index f55003757e..ba1db3fdf9 100644 --- a/ext/xslt/sablot.c +++ b/ext/xslt/sablot.c @@ -218,6 +218,7 @@ PHP_FUNCTION(xslt_create) handle->handlers = ecalloc(1, sizeof(struct xslt_handlers)); handle->err = ecalloc(1, sizeof(struct xslt_error)); handle->object = NULL; + handle->base_isset = 0; XSLT_LOG(handle).path = NULL; @@ -435,6 +436,7 @@ PHP_FUNCTION(xslt_set_base) /* Set the base */ SablotSetBase(XSLT_PROCESSOR(handle), Z_STRVAL_PP(base)); + XSLT_BASE_ISSET(handle) = 1; } /* }}} */ @@ -547,7 +549,6 @@ PHP_FUNCTION(xslt_process) xslt_make_array(args_p, &args); /* Can return NULL */ if (args) { - char *baseuri; TSRMLS_FETCH(); i=0; while (args[i]) { @@ -559,14 +560,17 @@ PHP_FUNCTION(xslt_process) } /* Since we have args passed, we need to set the base uri, so pull in executor - globals and set the base, using the current filename, specifally for the + globals and set the base, using the current filename, specifcally for the 'arg' scheme */ + if(XSLT_BASE_ISSET(handle) == 0) + { + char *baseuri; spprintf(&baseuri, 0, "file://%s", zend_get_executed_filename(TSRMLS_C)); + SablotSetBaseForScheme(XSLT_PROCESSOR(handle), "arg", baseuri); - SablotSetBaseForScheme(XSLT_PROCESSOR(handle), "arg", baseuri); - - if(baseuri) - efree(baseuri); + if(baseuri) + efree(baseuri); + } } } |
