diff options
author | Leslie Michael Orchard <l.m.orchard@pobox.com> | 2009-02-17 23:22:56 -0500 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-02-20 16:37:59 -0500 |
commit | 9a0e71f9bf3329004949a0cef61abb5a354c7688 (patch) | |
tree | d802c62bbc5709447e0bc582ea5ef394cd84f24d /actions/finishopenidlogin.php | |
parent | 17a6e6603058d412f3c3a7c6800f5d47fcf0def0 (diff) |
Fixing a bunch of undefined variable warnings in OpenID signup process
Diffstat (limited to 'actions/finishopenidlogin.php')
-rw-r--r-- | actions/finishopenidlogin.php | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/actions/finishopenidlogin.php b/actions/finishopenidlogin.php index 1e7b73a7f..6d92cb9aa 100644 --- a/actions/finishopenidlogin.php +++ b/actions/finishopenidlogin.php @@ -83,7 +83,7 @@ class FinishopenidloginAction extends Action function showContent() { - if ($this->message_text) { + if (!empty($this->message_text)) { $this->element('p', null, $this->message); return; } @@ -232,7 +232,8 @@ class FinishopenidloginAction extends Action return; } - if ($sreg['country']) { + $location = ''; + if (!empty($sreg['country'])) { if ($sreg['postcode']) { # XXX: use postcode to get city and region # XXX: also, store postcode somewhere -- it's valuable! @@ -242,12 +243,16 @@ class FinishopenidloginAction extends Action } } - if ($sreg['fullname'] && mb_strlen($sreg['fullname']) <= 255) { + if (!empty($sreg['fullname']) && mb_strlen($sreg['fullname']) <= 255) { $fullname = $sreg['fullname']; + } else { + $fullname = ''; } - if ($sreg['email'] && Validate::email($sreg['email'], true)) { + if (!empty($sreg['email']) && Validate::email($sreg['email'], true)) { $email = $sreg['email']; + } else { + $email = ''; } # XXX: add language @@ -328,7 +333,7 @@ class FinishopenidloginAction extends Action # Try the passed-in nickname - if ($sreg['nickname']) { + if (!empty($sreg['nickname'])) { $nickname = $this->nicknamize($sreg['nickname']); if ($this->isNewNickname($nickname)) { return $nickname; @@ -337,7 +342,7 @@ class FinishopenidloginAction extends Action # Try the full name - if ($sreg['fullname']) { + if (!empty($sreg['fullname'])) { $fullname = $this->nicknamize($sreg['fullname']); if ($this->isNewNickname($fullname)) { return $fullname; |