fixed empty title/alt if img metadata is empty

This commit is contained in:
real_nowhereman 2008-12-07 15:01:48 +00:00
parent 009032c95c
commit 975ead67e2

View File

@ -175,7 +175,7 @@ function do_bbcode_img ($action, $attributes, $content, $params, $node_object) {
if(is_array($img_info)) {
$iptc = iptcparse($img_info["APP13"]);
$title = @$iptc["2#005"][0]? wp_specialchars($iptc["2#005"][0]) : null;
$title = @$iptc["2#005"][0]? wp_specialchars($iptc["2#005"][0]) : $title;
$alt = isset($iptc["2#120"][0])? wp_specialchars($iptc["2#120"][0],1) : $title;
}