summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--classes/Memcached_DataObject.php2
-rwxr-xr-xscripts/deleteuser.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/classes/Memcached_DataObject.php b/classes/Memcached_DataObject.php
index 21f6781c2..b68a4af8e 100644
--- a/classes/Memcached_DataObject.php
+++ b/classes/Memcached_DataObject.php
@@ -174,7 +174,7 @@ class Memcached_DataObject extends DB_DataObject
$obj = $c->get(Memcached_DataObject::cacheKey($cls, $k, $v));
if (0 == strcasecmp($cls, 'User')) {
// Special case for User
- if (is_object($obj->id)) {
+ if (is_object($obj) && is_object($obj->id)) {
common_log(LOG_ERR, "User " . $obj->nickname . " was cached with User as ID; deleting");
$c->delete(Memcached_DataObject::cacheKey($cls, $k, $v));
return false;
diff --git a/scripts/deleteuser.php b/scripts/deleteuser.php
index 52389123c..5373c73ce 100755
--- a/scripts/deleteuser.php
+++ b/scripts/deleteuser.php
@@ -21,7 +21,7 @@
define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
$shortoptions = 'i::n::y';
-$longoptions = array('id::nickname::yes');
+$longoptions = array('id=', 'nickname=', 'yes');
$helptext = <<<END_OF_DELETEUSER_HELP
deleteuser.php [options]