add deprecated code
fix deprecated.php PHP errors