Ensure that DB connection is active at start of User::updateKeys() and Foreign_user::updateKeys(); calls to $this->_quote() require a live connection object and don't lazy-initialize themselves.

May fix WSOD when changing incoming email address.
This commit is contained in:
Brion Vibber 2010-03-18 09:22:08 -07:00
parent d115932466
commit 85b93310dd
2 changed files with 2 additions and 0 deletions

View File

@ -41,6 +41,7 @@ class Foreign_user extends Memcached_DataObject
function updateKeys(&$orig)
{
$this->_connect();
$parts = array();
foreach (array('id', 'service', 'uri', 'nickname') as $k) {
if (strcmp($this->$k, $orig->$k) != 0) {

View File

@ -87,6 +87,7 @@ class User extends Memcached_DataObject
function updateKeys(&$orig)
{
$this->_connect();
$parts = array();
foreach (array('nickname', 'email', 'jabber', 'incomingemail', 'sms', 'carrier', 'smsemail', 'language', 'timezone') as $k) {
if (strcmp($this->$k, $orig->$k) != 0) {