Handling a PHP unserialize offset error… and why it happens