cvs: php3 /functions string.c
| From: | Hartmut Holzgraefe | Date: | Thu, 20 Jul 2000 23:11:12 +0000 |
| Subject: | cvs: php3 /functions string.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-826@lists.php.net to get a copy of this message | ||
hholzgra Thu Jul 20 16:11:12 2000 EDT
Modified files:
/php3/functions string.c
Log:
fix for bug #5707
Index: php3/functions/string.c
diff -u php3/functions/string.c:1.212 php3/functions/string.c:1.213
--- php3/functions/string.c:1.212 Mon Jul 10 03:15:36 2000
+++ php3/functions/string.c Thu Jul 20 16:11:12 2000
@@ -30,7 +30,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: string.c,v 1.212 2000/07/10 10:15:36 sas Exp $ */
+/* $Id: string.c,v 1.213 2000/07/20 23:11:12 hholzgra Exp $ */
#include <stdio.h>
#include "php.h"
#include "internal_functions.h"
@@ -581,6 +581,8 @@
#endif
)
*c='\0';
+ else
+ *str='\0';
}
/* {{{ proto string dirname(string path)
@@ -597,7 +599,11 @@
convert_to_string(str);
ret = estrdup(str->value.str.val);
_php3_dirname(ret,str->value.str.len);
- RETVAL_STRING(ret,1);
+ if(*ret) {
+ RETVAL_STRING(ret,1);
+ } else {
+ RETVAL_FALSE;
+ }
efree(ret);
}
/* }}} */