Prevent strftime overflow on 32 bit systems

Fixes "strftime() expects parameter 2 to be integer, float given"

Closes pull request #156 and closes #155
This commit is contained in:
Andrés Maldonado 2022-03-21 19:08:04 +01:00 committed by Deon George
parent d4cae5065b
commit 97eed9d9cd

View File

@ -1196,7 +1196,8 @@ class PageRender extends Visitor {
else
return false;
return $shadow_date*24*3600;
$shadow_date_seconds = $shadow_date*24*3600;
return ($shadow_date_seconds > PHP_INT_MAX) ? PHP_INT_MAX: $shadow_date_seconds;
}
protected function drawShadowDateShadowAttribute($attribute) {