Issue #1158322 follow-up by chx: Fixed htmlspecialchars() expects parameter 1 to be string, array given errors in exception backtraces.