cvs: /php3/functions file.c string.c
| From: | Rasmus Lerdorf | Date: | Tue, 21 Sep 1999 17:46:54 +0000 |
| Subject: | cvs: /php3/functions file.c string.c | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-11163@lists.php.net to get a copy of this message | ||
rasmus Tue Sep 21 13:46:54 1999 EDT
Modified files:
/php3/functions file.c string.c
Log:
Small tweak
Index: php3/functions/file.c
diff -u php3/functions/file.c:1.225 php3/functions/file.c:1.226
--- php3/functions/file.c:1.225 Mon Sep 20 15:56:01 1999
+++ php3/functions/file.c Tue Sep 21 13:46:53 1999
@@ -26,7 +26,7 @@
| Authors: Rasmus Lerdorf <rasmus@lerdorf.on.ca> |
+----------------------------------------------------------------------+
*/
-/* $Id: file.c,v 1.225 1999/09/20 19:56:01 eschmid Exp $ */
+/* $Id: file.c,v 1.226 1999/09/21 17:46:53 rasmus Exp $ */
#ifdef THREAD_SAFE
#include "tls.h"
#endif
@@ -895,7 +895,8 @@
RETURN_FALSE;
}
- _php3_strip_tags(buf,len,GLOBAL(fgetss_state),allow->value.str.val);
+ /* strlen() can be used here since we are doing it on the return of an fgets() anyway */
+ _php3_strip_tags(buf,strlen(buf),GLOBAL(fgetss_state),allow?allow->value.str.val:NULL);
RETURN_STRING(buf,0);
}
/* }}} */
Index: php3/functions/string.c
diff -u php3/functions/string.c:1.198 php3/functions/string.c:1.199
--- php3/functions/string.c:1.198 Mon Sep 20 15:56:01 1999
+++ php3/functions/string.c Tue Sep 21 13:46:53 1999
@@ -30,7 +30,7 @@
*/
-/* $Id: string.c,v 1.198 1999/09/20 19:56:01 eschmid Exp $ */
+/* $Id: string.c,v 1.199 1999/09/21 17:46:53 rasmus Exp $ */
#ifdef THREAD_SAFE
#include "tls.h"
#endif
@@ -1782,7 +1782,7 @@
}
convert_to_string(str);
buf=estrdup(str->value.str.val);
- _php3_strip_tags(buf,str->value.str.len,0,allow->value.str.val);
+ _php3_strip_tags(buf,str->value.str.len,0,allow?allow->value.str.val:NULL);
RETURN_STRING(buf,0);
}
/* }}} */