in error detail_search:Trying to get property of non-object