Fix typos.
Fix empty return value for PHP 5.3.x.
Remove deprecated function.