Closed clarkwinkelmann closed 7 years ago
I thought I had considered that, did I miss a location?
https://github.com/flagrow/bazaar/blob/master/src/Listeners/AddApiAttributes.php#L45
You've considered it, but apparently not tested it :stuck_out_tongue_winking_eye:
var_dump(ini_get('memory_limit'));
string(2) "-1"
That strict ===
check cannot handle it.
(I just checked all this, I didn't notice there was code supposed to handle it during my quick check)
Right that's really stupid, so it should be a string comparison 🤦♂️
When
memory_limit
is set to -1,FileSizeHelper::identifySize()
fails with exception "Cannot identify -1."This prevents the admin panel from loading because that check is run at every request.
We need to handle this case without the method failing.