summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-03-17 05:25:38 +0000
committerBharat Mediratta <bharat@menalto.com>2009-03-17 05:25:38 +0000
commit8786ee3ffb7d42465737531e2e471c635a370b3b (patch)
tree8b006408fb6f4ee4646ba5a72b10beb17c97e3a1
parenta908c0e87856306a72b697a6f2fda418ec7feeb7 (diff)
Initialize $tags properly
-rw-r--r--modules/tag/helpers/tag_event.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/tag/helpers/tag_event.php b/modules/tag/helpers/tag_event.php
index c0f6b9d7..93e77c6c 100644
--- a/modules/tag/helpers/tag_event.php
+++ b/modules/tag/helpers/tag_event.php
@@ -25,9 +25,9 @@ class tag_event_Core {
* @param Item_Model $photo
*/
static function item_created($photo) {
+ $tags = array();
if ($photo->is_photo()) {
$path = $photo->file_path();
- $tags = array();
$size = getimagesize($photo->file_path(), $info);
if (is_array($info) && !empty($info["APP13"])) {
$iptc = iptcparse($info["APP13"]);
@@ -40,7 +40,6 @@ class tag_event_Core {
}
// @todo figure out how to read the keywords from xmp
-
foreach(array_keys($tags) as $tag) {
tag::add($photo, $tag);
}