Fix E_STRICT errors and enable test for PHP 5.4
Fix _getModelData result if model cacheQueries enable