fix E_DEPRECATED warnings