fixed method definition occurred PHP5.4 warning errors