mirror of
https://github.com/standardebooks/web.git
synced 2025-07-14 18:42:00 -04:00
Fix PHPStan errors
This commit is contained in:
parent
6af2717773
commit
008ffc8ccd
5 changed files with 10 additions and 5 deletions
|
@ -1,4 +1,5 @@
|
|||
<?
|
||||
use Safe\DateTimeImmutable;
|
||||
use function Safe\apcu_fetch;
|
||||
|
||||
// If the user is not logged in, or has less than some amount of downloads, show a thank-you page
|
||||
|
@ -60,7 +61,7 @@ try{
|
|||
|
||||
// Increment local download count, expires in 2 weeks
|
||||
$downloadCount++;
|
||||
setcookie('download-count', (string)$downloadCount, ['expires' => (new DateTimeImmutable('+2 week'))->format('U'), 'path' => '/', 'domain' => SITE_DOMAIN, 'secure' => true, 'httponly' => false, 'samesite' => 'Lax']);
|
||||
setcookie('download-count', (string)$downloadCount, ['expires' => intval((new DateTimeImmutable('+2 week'))->format('U')), 'path' => '/', 'domain' => SITE_DOMAIN, 'secure' => true, 'httponly' => false, 'samesite' => 'Lax']);
|
||||
}
|
||||
catch(Exceptions\InvalidFileException | Exceptions\EbookNotFoundException){
|
||||
Template::Emit404();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue