From ef3991dbbe0acdba2dd7050b99f951ccfe5b8258 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Mon, 8 Mar 2010 15:31:16 +0800 Subject: [PATCH] Fixed warning messages when auto-registering a new LDAP user. On my test system (without memcache), while testing the LDAP authentication plugin, when I sign in for the first time, triggering auto-registration, I get these messages in the output page: Warning: ksort() expects parameter 1 to be array, null given in /home/jeff/Documents/code/statusnet/classes/Memcached_DataObject.php on line 219 Warning: Invalid argument supplied for foreach() in /home/jeff/Documents/code/statusnet/classes/Memcached_DataObject.php on line 224 Warning: assert() [function.assert]: Assertion failed in /home/jeff/Documents/code/statusnet/classes/Memcached_DataObject.php on line 241 (plus two "Cannot modify header information..." messages as a result of the above warnings) This change appears to fix this (although I can't really explain exactly why). --- classes/User_username.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/User_username.php b/classes/User_username.php index 853fd5cb86..8d99cddd3f 100644 --- a/classes/User_username.php +++ b/classes/User_username.php @@ -55,7 +55,7 @@ class User_username extends Memcached_DataObject // now define the keys. function keys() { - return array('provider_name', 'username'); + return array('provider_name' => 'K', 'username' => 'K'); } }