]> git.mjollnir.org Git - s9y.git/commitdiff
fix array casting, thanks to falk
authorgarvinhicking <garvinhicking>
Tue, 25 Oct 2005 09:50:43 +0000 (09:50 +0000)
committergarvinhicking <garvinhicking>
Tue, 25 Oct 2005 09:50:43 +0000 (09:50 +0000)
plugins/serendipity_event_entryproperties/serendipity_event_entryproperties.php

index 954fa50d6b7e39fddb5587aab35904bd2dddf2df..95f37f54d1a7877471eca5b745157813bf31e481 100644 (file)
@@ -429,10 +429,12 @@ class serendipity_event_entryproperties extends serendipity_event
                         $total = serendipity_getTotalEntries();
                         printf(PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_TOTAL . '<br />', $total);
 
-                        foreach($entries AS $idx => $entry) {
-                            printf(PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING . '<br />', $entry['id'], htmlspecialchars($entry['title']));
-                            $this->updateCache($entry);
-                            echo PLUGIN_EVENT_ENTRYPROPERTIES_CACHED . '<br /><br />';
+                        if (is_array($entries)) {
+                            foreach($entries AS $idx => $entry) {
+                                printf(PLUGIN_EVENT_ENTRYPROPERTIES_CACHE_BUILDING . '<br />', $entry['id'], htmlspecialchars($entry['title']));
+                                $this->updateCache($entry);
+                                echo PLUGIN_EVENT_ENTRYPROPERTIES_CACHED . '<br /><br />';
+                            }
                         }
 
                         echo '<br />';