How to handle core code throwing notice on valid input?

I have combination of valid input with native WP function throwing PHP notice. In this specific case it is image without extension with image_resize().

This is usually suppressed by WP, but it still has me worried because it runs in feed and such things can explode XML to pieces.

If I can neither change core or input then what should I do? I suppose I could try to explicitly suppress error output around there.

Or should I just ignore the possibility as edge case?

2 Answers
2

Simply use the @ operator in front of a function to suppress an error message/notice/whatever. Fun as it is: Even the image_resize() function uses it for chmod. 🙂

Leave a Comment