Fixes PHP warning when logging
Implements #905 Add class to smilies