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
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
. 🙂