Remove PHP warning in magic.php