filename is already a char *, why are you casting it?
On Wed, 31 Jul 2002, Melvyn Sopacua wrote:
> Attached a test. Additionally I added a cast (char *) to line 360 to get
> rid of the
> compiler warning. Z_STRVAL_PP doesn't work there so I'm not actually sure this
> fix create more problems than it solves:
>
> Index: filestat.c
> ===================================================================
> RCS file: /repository/php4/ext/standard/filestat.c,v
> retrieving revision 1.101
> diff -u -r1.101 filestat.c
> --- filestat.c 30 Jul 2002 20:24:13 -0000 1.101
> +++ filestat.c 30 Jul 2002 21:57:21 -0000
> @@ -555,7 +555,8 @@
> RETURN_FALSE;
> }
>
> - if (php_check_open_basedir(filename TSRMLS_CC)) {
> + if (php_check_open_basedir((char *) filename TSRMLS_CC)) {
> +
> RETURN_FALSE;
> }
>
> At 22:51 30-7-2002, you wrote:
> > ID: 18623
> > Updated by: [EMAIL PROTECTED]
> > Reported By: [EMAIL PROTECTED]
> > Status: Verified
> > Bug Type: Filesystem function related
> > Operating System: Compaq Tru64/Alpha
> > PHP Version: 4CVS-2002-07-29
> > New Comment:
> >
> >I think, you meant this one (it's from [EMAIL PROTECTED], not
> >[EMAIL PROTECTED]):
> >
> >--- old_filestat.c 2002-07-28 23:35:50.000000000 +0000
> >+++ filestat.c 2002-07-30 17:16:48.000000000 +0000
> >@@ -481,9 +481,7 @@
> > newtime = &newtimebuf;
> >
> > if (ac == 1 && zend_get_parameters_ex(1, &filename) != FAILURE)
> >{
> >-#ifndef HAVE_UTIME_NULL
> > newtime->modtime = newtime->actime = time(NULL);
> >-#endif
> > } else if (ac == 2 && zend_get_parameters_ex(2, &filename,
> >&filetime) != FAILURE) {
> > convert_to_long_ex(filetime);
> > newtime->actime = time(NULL);
> >
> >
> >
> >----
> >
> >and yes... It works fine. Tested with php4-200207301200 tested on
> >Compaq Testdrive machine (a little bit slow, but it does what it should
> >do). Full report here:
> >http://www.nohn.net/lalafarm/php4-test-reports/4.3.0-dev-1028061991.xml
>
>
> Met vriendelijke groeten / With kind regards,
>
> Webmaster IDG.nl
> Melvyn Sopacua
>
>
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php