elcobvg / laravel-opcache

Custom OPcache Cache Driver for Laravel. Faster than Redis, Memcache or APC.
MIT License
44 stars 12 forks source link

WhiteFile() receiving float instead int #9

Closed jonathangoncalves closed 6 years ago

jonathangoncalves commented 6 years ago

I'm running my application with opcache, and give this error:

Type error: Argument 2 passed to ElcoBvg\Opcache\Store::writeFile() must be of the type integer, float given, called in \vendor\elcobvg\laravel-opcache\src\Store.php on line 104

The fix is just cast the $expiration before send, but I don't know what is the real problem, if it's mine...

What's the deal?

elcobvg commented 6 years ago

Yeah, shouldn't happen obviously. As soon as I find some time, I'll look into this.

elcobvg commented 6 years ago

Can you provide a little bit more context about how/when this happened in your app? Other than forcing the issue by hard coding an artificial test case, I haven't been able to reproduce your error...