Closed GCalmels closed 6 years ago
Problem with this is that it now retrieves the file twice, discarding it the first time. Especially when that file is remote, that might have a severe negative performance impact.
What I'd do is remove that check in setCertificate
entirely, and add a check to see if the contents of the file are empty just after the actual file_get_contents that is being done later on.
I did not add a check if the content is empty because file_get_contents
will do too ! Right ?
I changed
file_exists
byfile_get_contents
to fix this issue https://github.com/tschoffelen/php-pkpass/issues/82