Merge pull request #127 from chalbertgit/master
Fixed an introduced bug and verified the new implementation works properly
This commit is contained in:
commit
ae3e9fbf71
@ -71,17 +71,18 @@ class iptc_Core {
|
|||||||
$record->key_count = count($keys);
|
$record->key_count = count($keys);
|
||||||
$record->dirty = 0;
|
$record->dirty = 0;
|
||||||
$record->save();
|
$record->save();
|
||||||
if (!empty($iptc['Keywords']) {
|
|
||||||
$tags = explode(';', $iptc['Keywords']);
|
if ( array_key_exists('Keywords', $keys) ) {
|
||||||
foreach ($tags as $tag) {
|
$tags = explode(';', $keys['Keywords']);
|
||||||
try {
|
foreach ($tags as $tag) {
|
||||||
tag::add($item, $tag);
|
try {
|
||||||
} catch (Exception $e) {
|
tag::add($item, $tag);
|
||||||
Kohana_Log::add("error", "Error adding tag: $tag\n"
|
} catch (Exception $e) {
|
||||||
. $e->getMessage() . "\n"
|
Kohana_Log::add("error", "Error adding tag: $tag\n"
|
||||||
. $e->getTraceAsString();
|
. $e->getMessage() . "\n"
|
||||||
}
|
. $e->getTraceAsString());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user