PHP 5.5 deprecation warning fixed