Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv873
Modified Files:
Tag: branch-smarty
serendipity_sidebar_items.php
Log Message:
fixed foreach() error on installation.
Index: serendipity_sidebar_items.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_sidebar_items.php,v
retrieving revision 1.84.2.2
retrieving revision 1.84.2.3
diff -u -d -r1.84.2.2 -r1.84.2.3
--- serendipity_sidebar_items.php 25 Sep 2004 23:29:20 -0000 1.84.2.2
+++ serendipity_sidebar_items.php 27 Sep 2004 13:19:13 -0000 1.84.2.3
@@ -833,8 +833,10 @@
$row_authors = serendipity_db_query("SELECT username, authorid FROM {$serendipity['dbPrefix']}authors");
$authors = array('all' => ALL_AUTHORS);
- foreach($row_authors AS $rownr => $row) {
- $authors[$row['authorid']] = $row['username'];
+ if (is_array($authors)) {
+ foreach($row_authors AS $rownr => $row) {
+ $authors[$row['authorid']] = $row['username'];
+ }
}
$this->author_select_values = $authors;
|