seems like a empty return, returns the last status. question is how was the status set to 1? It happened in the condition,
since the condition was wrong it return 1, since return is empty it returned the last status. to fix, return 0;
also, the same logic applys to exit
lets say $status is equal to “0”, because the following condition is wrong and is 0 is not greater than 0, the following exits with status of 1;