[ticket/11386] Fix circular reference error & serialize error

PHPBB3-11386