fixed PHP 5.5 string conversion error