It is a common misconception that peanut butter is bad for your four-legged buddy, whereas it is actually among the people foods that are generally safe for dogs.
Dogs have this interesting habit of exploring all the corners of the world using their mouths. Your pooch is no exception and he has most likely eaten something that was not meant to be eaten at all.