We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ec8b5d commit 3f2166fCopy full SHA for 3f2166f
src/FontLib/BinaryStream.php
@@ -275,10 +275,8 @@ public function readLongDateTime() {
275
$this->readUInt32(); // ignored
276
$date = $this->readUInt32() - 2082844800;
277
278
- if ($date > PHP_INT_MAX) {
279
- $date = PHP_INT_MAX;
280
- } elseif ($date < PHP_INT_MIN) {
281
- $date = PHP_INT_MIN;
+ if (is_string($date) || $date > PHP_INT_MAX || $date < PHP_INT_MIN) {
+ $date = 0;
282
}
283
284
return strftime("%Y-%m-%d %H:%M:%S", $date);
0 commit comments