Fixed deprecation warning for php5.5