php5.4 stdClass Bug fix