diff options
author | Melvyn Sopacua <msopacua@php.net> | 2002-11-02 15:01:43 +0000 |
---|---|---|
committer | Melvyn Sopacua <msopacua@php.net> | 2002-11-02 15:01:43 +0000 |
commit | 8a210264e71b745f2fcb219ba01e3222cf97fd83 (patch) | |
tree | c37a58512bf49201a7c35dc1fe10094c5fce33cd | |
parent | b39ca47d208159521d9ad2f8a05b11c7f45d8b6d (diff) | |
download | php-git-8a210264e71b745f2fcb219ba01e3222cf97fd83.tar.gz |
- Use spprintf to avoid two calls to zend_get_executed_filename, suggested
by Marcus Börger
-rw-r--r-- | ext/xslt/sablot.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/xslt/sablot.c b/ext/xslt/sablot.c index 474f77f221..b8de408f95 100644 --- a/ext/xslt/sablot.c +++ b/ext/xslt/sablot.c @@ -554,8 +554,7 @@ 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 'arg' scheme */ - baseuri = (char *)emalloc(strlen(zend_get_executed_filename(TSRMLS_C))+7+1); - sprintf(baseuri, "file://%s", zend_get_executed_filename(TSRMLS_C)); + spprintf(&baseuri, 0, "file://%s", zend_get_executed_filename(TSRMLS_C)); SablotSetBaseForScheme(XSLT_PROCESSOR(handle), "arg", baseuri); |