Arrexel / phpbash

A semi-interactive PHP shell compressed into a single file.
Apache License 2.0
868 stars 195 forks source link

replaced isset() by !empty() #13

Closed artyuum closed 6 years ago

artyuum commented 6 years ago

Always use !empty() over isset() when you need to verify that the user has provided a value. The function empty() also checks if the variable is set. This prevent the user from sending an empty string. See here for more informations: https://stackoverflow.com/questions/7191626/isset-and-empty-what-to-use

Arrexel commented 6 years ago

Nice, I made a slight modification. We will keep the cmd isset() check as-is to prevent issues in other areas and to preserve terminal-like functionality when sending blank commands. Refer to the PR made for a bit more info