Moviehole reports that Ben Affleck did indeed film his cameo as Daredevil for Jennifer Garner’s Elektra:

Got an answer today on that from a reliable source at Rupert’s camp. The FOX insider tells me that Affleck did indeed film a cameo, appearing as “Daredevil” red-head Matt Murdock in a dream sequence, but once “Jen and Ben announced they were having a relationship, the studio got nervous and trimmed him out of the picture”.