Fix for php5.4

fixed for php5.4