sesser Fri May 28 09:38:19 2004 EDT
Modified files: (Branch: PHP_4_3)
/php-src/ext/standard http_fopen_wrapper.c
Log:
MFH
http://cvs.php.net/diff.php/php-src/ext/standard/http_fopen_wrapper.c?r1=1.53.2.18&r2=1.53.2.19&ty=u
Index: php-src/ext/standard/http_fopen_wrapper.c
diff -u php-src/ext/standard/http_fopen_wrapper.c:1.53.2.18
php-src/ext/standard/http_fopen_wrapper.c:1.53.2.19
--- php-src/ext/standard/http_fopen_wrapper.c:1.53.2.18 Wed Feb 25 19:13:02 2004
+++ php-src/ext/standard/http_fopen_wrapper.c Fri May 28 09:38:19 2004
@@ -18,7 +18,7 @@
| Wez Furlong <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
*/
-/* $Id: http_fopen_wrapper.c,v 1.53.2.18 2004/02/26 00:13:02 sniper Exp $ */
+/* $Id: http_fopen_wrapper.c,v 1.53.2.19 2004/05/28 13:38:19 sesser Exp $ */
#include "php.h"
#include "php_globals.h"
@@ -467,7 +467,12 @@
char *s = strrchr(resource->path, '/');
if (!s) {
s = resource->path;
- *s = '/';
+ if (!s[0]) {
+ efree(s);
+ s = resource->path =
estrdup("/");
+ } else {
+ *s = '/';
+ }
}
s[1] = '\0';
if (resource->path &&
*(resource->path) == '/' && *(resource->path + 1) == '\0') {
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php