Fixed a deprecation warning in PHP 5.4
Fixed additional deprecation warnings in PHP 5.4