cvs: php4 /ext/standard string.c

From: Date: Wed, 22 Nov 2000 04:15:28 +0000
Subject: cvs: php4 /ext/standard string.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-2726@lists.php.net to get a copy of this message
sas Tue Nov 21 20:15:28 2000 EDT Modified files: /php4/ext/standard string.c Log: Don't access opt, if opt was not set. Index: php4/ext/standard/string.c diff -u php4/ext/standard/string.c:1.164 php4/ext/standard/string.c:1.165 --- php4/ext/standard/string.c:1.164 Mon Nov 6 11:41:30 2000 +++ php4/ext/standard/string.c Tue Nov 21 20:15:27 2000 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: string.c,v 1.164 2000/11/06 19:41:30 andrei Exp $ */ +/* $Id: string.c,v 1.165 2000/11/22 04:15:27 sas Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -788,7 +788,7 @@ MAKE_STD_ZVAL(tmp); array_init(tmp); - if (opt == PHP_PATHINFO_DIRNAME || argc < 2) { + if (argc < 2 || opt == PHP_PATHINFO_DIRNAME) { ret = estrndup(Z_STRVAL_PP(path), len); php_dirname(ret, len); if (*ret) @@ -796,12 +796,12 @@ efree(ret); } - if (opt == PHP_PATHINFO_BASENAME || argc < 2) { + if (argc < 2 || opt == PHP_PATHINFO_BASENAME) ret = php_basename(Z_STRVAL_PP(path), len); add_assoc_string(tmp, "basename", ret, 0); } - if (opt == PHP_PATHINFO_EXTENSION || argc < 2) { + if (argc < 2 || opt == PHP_PATHINFO_EXTENSION) { char *p; int idx;

« previous php.cvs (#2726) next »