aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/album.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/album.php b/lib/album.php
index 916ccbc31..0d5140875 100644
--- a/lib/album.php
+++ b/lib/album.php
@@ -210,9 +210,11 @@ class TidypicsAlbum extends ElggObject {
protected function deleteImages() {
// get all the images from this album as long as less than 999 images
$images = get_entities("object", "image", $this->guid, '', 999);
- foreach ($images as $image) {
- if ($image) {
- $image->delete();
+ if ($images) {
+ foreach ($images as $image) {
+ if ($image) {
+ $image->delete();
+ }
}
}
}