There are many functions (well most really) in the PHP language that get all upset and throw warnings and notices when they don't like something about their input - rather than just returning \[code\]FALSE\[/code\] (though they do that too).One place this is really common is in the GD and string functions. They are very particular about their arguments and it's really easy for user input to fail meeting their standards.For example, a user uploads a image that is corrupt (intentionally or unintentionally). Resulting in warnings from the GD library.So far there are only three ways I have found to silence PHP on this issue:
- Change your error reporting setting in the ini or at runtime (yuck).
- Suppress errors with the slow \[code\]@\[/code\] symbol.
- Change error reporting right before/after the function: