]> granicus.if.org Git - php/commitdiff
fix build and #36887
authorAntony Dovgal <tony2001@php.net>
Tue, 28 Mar 2006 09:46:35 +0000 (09:46 +0000)
committerAntony Dovgal <tony2001@php.net>
Tue, 28 Mar 2006 09:46:35 +0000 (09:46 +0000)
ext/standard/file.c

index c85fbd8aba928e2c96a108a2314d3321bf1509a8..844e8f0712e9b62f1c3673bd7b079c794aea686e 100644 (file)
@@ -554,7 +554,6 @@ PHP_FUNCTION(tempnam)
        char *opened_path;
        char *p;
        FILE *fp;
-       size_t p_len;
 
        if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &arg1, &arg2) == FAILURE) {
                WRONG_PARAM_COUNT;
@@ -568,8 +567,8 @@ PHP_FUNCTION(tempnam)
 
        d = estrndup(Z_STRVAL_PP(arg1), Z_STRLEN_PP(arg1));
 
-       php_basename(Z_STRVAL_PP(arg2), Z_STRLEN_PP(arg2), NULL, 0, &p, &p_len TSRMLS_CC);
-       if (p_len > 64) {
+       p = php_basename(Z_STRVAL_PP(arg2), Z_STRLEN_PP(arg2), NULL, 0);
+       if (strlen(p) > 64) {
                p[63] = '\0';
        }