[wp-trac] [WordPress Trac] #48204: wp_exif_date2ts throws notice on empty date
WordPress Trac
noreply at wordpress.org
Thu Oct 3 19:39:39 UTC 2019
#48204: wp_exif_date2ts throws notice on empty date
--------------------------+-----------------------------
Reporter: nosilver4u | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 5.2.3
Severity: minor | Keywords:
Focuses: |
--------------------------+-----------------------------
When an image has the EXIF field DateTimeDigitized defined, but set to an
empty timestamp, like
{{{
: : : :
}}}
a PHP notice is thrown during upload.
I don't know how common this is, but I've seen it on several family photos
that were scanned by my aunt. The EXIF info mentions both HP Scanjet 4370,
FinePixViewer Ver.4.2, and FUJIFILM.
Anyway, it can be pre-empted with this between the two calls to explode():
{{{
if ( ':' === $date ) {
return '';
}
}}}
I've attached a sample file to replicate the problem.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48204>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list