As GM i'd rule that he'd attack the trap or, rather, the source of the spell - where the spell was fired from, or, where he perceives the spell was fired from. Doesn't seem like that much of a stretch to interpret the "Attack Caster" as "Attack Source", since the caster is the one who "Cast" the spell, and, in this case, who "Cast" the spell was the trap.
Seems reasonable, and falls squarely on the realm of common sense, but i'll agree that it's RAI and not RAW.
If you choose to go with absolute RAW, then, since the original caster of the spell - the one that made the trap - is no longer present, then the action mandated by the roll is deemed impossible and as per the rules, the character then just babbles incoherently.