fix  E_DEPRECATED as E_WARNING for php 5.2