Skip to content

Commit

Permalink
do not crash on empty seconds in DSS module
Browse files Browse the repository at this point in the history
  • Loading branch information
jmper committed Feb 1, 2024
1 parent 19c9d00 commit 2622a43
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions getid3/module.audio.dss.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ public function Analyze() {
*/
public function DSSdateStringToUnixDate($datestring) {
$y = (int) substr($datestring, 0, 2);
$m = substr($datestring, 2, 2);
$d = substr($datestring, 4, 2);
$h = substr($datestring, 6, 2);
$i = substr($datestring, 8, 2);
$s = substr($datestring, 10, 2);
$m = (int) substr($datestring, 2, 2);
$d = (int) substr($datestring, 4, 2);
$h = (int) substr($datestring, 6, 2);
$i = (int) substr($datestring, 8, 2);
$s = (int) substr($datestring, 10, 2);
$y += (($y < 95) ? 2000 : 1900);
return mktime($h, $i, $s, $m, $d, $y);
}
Expand Down

0 comments on commit 2622a43

Please sign in to comment.