Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix for PHP 5.3 warning on empty user object

Resolves issue #2
  • Loading branch information...
commit 6590fc52dfff54fcece04d324227376f83e628b4 1 parent 790e8c1
@benedmunds benedmunds authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 2.x/ldap/system/cms/modules/users/controllers/users.php
View
7 2.x/ldap/system/cms/modules/users/controllers/users.php
@@ -629,6 +629,11 @@ public function register()
$user->email = isset($user_hash['email']) ? $user_hash['email'] : '';
}
+ if (!isset($user) || !is_object($user))
+ {
+ $user = new stdClass;
+ }
+
// Repopulate the form
foreach ($validation as $rule)
{
@@ -1082,4 +1087,4 @@ public function _email_check($email)
return TRUE;
}
-}
+}
Please sign in to comment.
Something went wrong with that request. Please try again.