added conditional for magic quotes
Merge commit '3b8a22787804965a5e81cb4a6f308220e26d6385' into php5.5_compat