diff options
-rw-r--r-- | actions/register.php | 1 | ||||
-rw-r--r-- | lib/action.php | 12 |
2 files changed, 6 insertions, 7 deletions
diff --git a/actions/register.php b/actions/register.php index 42b46bcc3..d2e54b634 100644 --- a/actions/register.php +++ b/actions/register.php @@ -34,7 +34,6 @@ class RegisterAction extends Action { } function try_register() { - print_r($this->args); $nickname = $this->trimmed('nickname'); $email = $this->trimmed('email'); diff --git a/lib/action.php b/lib/action.php index 67eaf9ed7..dae50e6e3 100644 --- a/lib/action.php +++ b/lib/action.php @@ -50,12 +50,12 @@ class Action { // lawsuit function boolean($key, $def=false) { $arg = $this->arg($key); return (is_null($arg)) ? $def : - (strcasecmp($arg, 'true')) ? true : - (strcasecmp($arg, 'yes')) ? true : - (strcasecmp($arg, '1')) ? true : - (strcasecmp($arg, 'false')) ? false : - (strcasecmp($arg, 'no')) ? false : - (strcasecmp($arg, '0')) ? false : + (strcasecmp($arg, 'true') == 0) ? true : + (strcasecmp($arg, 'yes') == 0) ? true : + (strcasecmp($arg, '1') == 0) ? true : + (strcasecmp($arg, 'false') == 0) ? false : + (strcasecmp($arg, 'no') == 0) ? false : + (strcasecmp($arg, '0') == 0) ? false : $def; } } |