Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9574
Modified Files:
serendipity_functions.inc.php
Log Message:
Make bloody sure there is a $comment['id'] before looking for parents
This fixes a nasty endless-loop bug when previewing comments
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.317
retrieving revision 1.318
diff -u -d -r1.317 -r1.318
--- serendipity_functions.inc.php 5 Jul 2004 20:38:53 -0000 1.317
+++ serendipity_functions.inc.php 5 Jul 2004 21:34:22 -0000 1.318
@@ -222,7 +222,7 @@
<?php
}
-function serendipity_displayCommentForm($id, $url = '?', $comments = NULL) {
+function serendipity_displayCommentForm($id, $url = '', $comments = NULL) {
global $serendipity;
if ( $comments == NULL ) {
@@ -1481,7 +1481,11 @@
?>
</div>
- <?php serendipity_printComments($comments, $allow_comments, $show_admin, $comment['id'], $i . '.'); ?>
+ <?php
+ if ( $comment['id'] ) {
+ serendipity_printComments($comments, $allow_comments, $show_admin, $comment['id'], $i . '.');
+ }
+ ?>
</div>
<br />
<?php
|