Modal using old error class bug fix

Modal class was still using the old error class causing problems.
Updated to use trigger_error