Cast to array. fixes #8148

git-svn-id: https://develop.svn.wordpress.org/trunk@9698 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-11-14 22:50:46 +00:00
parent 7db2007a7b
commit f6f653c05b

View File

@ -70,7 +70,7 @@ function dismissed_updates() {
<?php <?php
echo '<p class="hide-if-no-js"><a id="show-dismissed" href="#">'.__('Show hidden updates').'</a></p>'; echo '<p class="hide-if-no-js"><a id="show-dismissed" href="#">'.__('Show hidden updates').'</a></p>';
echo '<ul id="dismissed-updates" class="core-updates dismissed">'; echo '<ul id="dismissed-updates" class="core-updates dismissed">';
foreach($dismissed as $update) { foreach( (array) $dismissed as $update) {
echo '<li>'; echo '<li>';
list_core_update( $update ); list_core_update( $update );
echo '</li>'; echo '</li>';
@ -108,7 +108,7 @@ function core_upgrade_preamble() {
echo '<ul class="core-updates">'; echo '<ul class="core-updates">';
$alternate = true; $alternate = true;
foreach( $updates as $update ) { foreach( (array) $updates as $update ) {
$class = $alternate? ' class="alternate"' : ''; $class = $alternate? ' class="alternate"' : '';
$alternate = !$alternate; $alternate = !$alternate;
echo "<li $class>"; echo "<li $class>";