I’m building a file uploader that gets IPTC data from the image and inserts it into a db but I keep getting this error:
> A PHP Error was encountered
>
> Severity: Notice
>
> Message: Undefined index: 2#120
>
> Filename: controllers/upload.php
>
> Line Number: 63
Here’s the line from the controller:
$iptc_description = $iptc["2#120"];
The script works perfectly as it’s supposed to, but it keeps throwing up this error and I can’t figure out why.
Replace that line with (your using the variable before its set):
Or if you don’t like one-liners: