session_unregister not available with php 5.4, so you can remove the function call.
With an equal call, there will only be unset - so you can replace
session_unregister('username');
with
unset($_SESSION['username']);
if you do not want to rewrite all your code, you can write your own session_unregister function
if (!function_exists('session_unregister')) { function session_unregister($var) { unset($_SESSION[$var]); } }
This function does not do the same, but in most cases itβs enough
source share