Skip to content
Snippets Groups Projects
Commit 4f81cece authored by Mike Pearce's avatar Mike Pearce
Browse files

Removed exceptions and error suppressions, replaced output buffering with file_get_contents()

As we hide Exceptions from the end user, I've changed it to _doing_it_wrong(), so even if there is a problem, it'll be picked up in development.
The errors were supporessed because if image data was passed as a string, the file_exists() and is_readable() don't pattern match, they look for a file. So complain they were passed a string and not a file path. The best way around this is to look for a supported file extension first.
Output buffering seems overkill when you're only looking for the content of one file. So changed to file_get_contents()
parent 5746d3ed
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment