diff --git a/modules/metadata/XmpReader.php b/modules/metadata/XmpReader.php index 075aced..092c4b4 100644 --- a/modules/metadata/XmpReader.php +++ b/modules/metadata/XmpReader.php @@ -64,15 +64,19 @@ public function registerShortcuts( $value = '', $tag, $xmp ) { $child_taxonomy_delimiter = pp_api::getOption('core', 'metadata', 'custom_taxonomies_tag_delimiter') ?: ':'; // drop keywords uses as child taxonomies. - foreach ( $keywords as $k => $v ) { + + if ( $keywords ) { - if ( ! strpos($v, $child_taxonomy_delimiter ) ) { + foreach ( $keywords as $k => $v ) { - $nkeywords[] = $v; + if ( ! strpos($v, $child_taxonomy_delimiter ) ) { + + $nkeywords[] = $v; + } } + + return implode( ', ', $nkeywords); } - - return implode( ', ', $nkeywords); } }