check if the attribute is set before deleting it with T_OBJECT_EX (fixes #7604)

Also, add a note to the docs about the better behavior of T_OBJECT_EX as
compared to T_OBJECT.
4 files changed