Error when trying to write html code to -IPTC:Caption-Abstract

Started by BigIsland, March 27, 2023, 12:43:00 PM

Previous topic - Next topic

BigIsland


Phil Harvey

I don't even see if/where you are running ExifTool.  And the given error isn't an ExifTool error.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

BigIsland

$command = isset($conf['exiftool_path']) ? $conf['exiftool_path'] : 'exiftool -m -codedcharacterset=utf8 -overwrite_original';
  $command.= ' -q';

  if (strlen($name) > 0)
  {
    # 2#105 in iptcparse($imginfo['APP13'])
    $command.= ' -IPTC:Headline="'.$name.'"';

    # 2#005 in iptcparse($imginfo['APP13'])
    $command.= ' -IPTC:ObjectName="'.wm_cutString($name, 64).'"';
  }

  if (strlen($description) > 0)
  {
    # 2#120 in iptcparse($imginfo['APP13'])
    $command.= ' -IPTC:Caption-Abstract="'.$description.'"';
  }

  if (strlen($date_creation) > 0)
  {
    # 2#055 in iptcparse($imginfo['APP13'])
    $command.= ' -IPTC:DateCreated="'.$date_creation.'"';
  }

  if (strlen($date_available) > 0)
  {
    # 2#030 in iptcparse($imginfo['APP13'])
    $command.= ' -IPTC:ReleaseDate="'.$date_available.'"';
  }

BigIsland

I found the problem. The html code had double quotes ". changed to single quote' Problem solved.