Base encode previous error for PHP 5.3+