I have had several DSS/DS2 files that caused '[TypeError] mktime(): Argument https://github.com/JamesHeinrich/getID3/pull/3 ($second) must be of type ?int, string given' in module.audio.dss.php in DSSdateStringToUnixDate() function.
After analyzing I found out that the files did not have seconds value in their creation date. So substr returned empty string and empty string passed to mktime() causes TypeError, at least in PHP 8.1 and later.
I have enclosed all substrings in DSSdateStringToUnixDate() with int() so they are always converted to integers, empty strings to zeros, and mktime() expects integers so it should be more or less correct.
I have had several DSS/DS2 files that caused '[TypeError] mktime(): Argument https://github.com/JamesHeinrich/getID3/pull/3 ($second) must be of type ?int, string given' in module.audio.dss.php in DSSdateStringToUnixDate() function. After analyzing I found out that the files did not have seconds value in their creation date. So substr returned empty string and empty string passed to mktime() causes TypeError, at least in PHP 8.1 and later. I have enclosed all substrings in DSSdateStringToUnixDate() with int() so they are always converted to integers, empty strings to zeros, and mktime() expects integers so it should be more or less correct.