In the case of a two-phase medium – such as the soil, which consists of an elastic skeleton and is filled with pore fluids – stress and strain within the medium are dependent on both phases. Similarly, in the case of heat transfer, heat is conducted through the two phases at different rates, with an additional heat transfer between the phases. In the classical approach to modelling a porous medium, it is assumed that the fluid filling the pore space is water, which is incompressible. In the case of gas, the volume of which is strongly dependent on temperature and pressure, one should take this behavior into account in the constitutive relations for the medium. This work defines the physical relations of a two-phase medium and provides heat transfer equations, constructed for a porous, elastic skeleton with fluid-filled pores, which may be: liquid, gas, or mixture of liquid and a gas in non-isothermal conditions. The paper will present constitutive relations derived from the laws of irreversible thermodynamics, assuming that pores are filled with either a liquid or a gas. These relations, in the opinion of the authors, may be used as the basis for the construction of a model of the medium filled partly with a liquid and partly with a gas. It includes the possibility of independent heat transfer through any given two-phase medium phase, with the transfer of heat between the phases.