A detective movie or episode where there was a cryptic phrase that once understood opened a hidden door in a fireplace. Once going thru the door, if you did not prevent the door from closing, the person was trapped. The detective was trapped with another person, and they also found a previous person that was trapped and had died. The hidden passage contained a valuable treasure, which was what they were looking for. Eventually the detective and the person was saved.