summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-06-18 12:22:41 -0700
committerEvan Prodromou <evan@controlyourself.ca>2009-06-18 12:22:41 -0700
commit68b34b32667025b6d3ab74c0a6b5b356d1f24b10 (patch)
tree2e037446751b43a8ac2728c8d5b507da3ff3f915 /classes
parent3f54840b51d5565fdeb7057661ff730bc0e41833 (diff)
parentd3fa832f76c90c194e0a60448ad8c53a043f5438 (diff)
Merge branch '0.8.x' of git@gitorious.org:+laconica-developers/laconica/dev into 0.8.x
Diffstat (limited to 'classes')
-rw-r--r--classes/Memcached_DataObject.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/classes/Memcached_DataObject.php b/classes/Memcached_DataObject.php
index 33ac70dd0..f945e94ff 100644
--- a/classes/Memcached_DataObject.php
+++ b/classes/Memcached_DataObject.php
@@ -242,13 +242,16 @@ class Memcached_DataObject extends DB_DataObject
if (common_config('db', 'type') == 'mysql' &&
common_config('db', 'utf8')) {
$conn = $DB->connection;
- if ($DB instanceof DB_mysqli) {
- mysqli_set_charset($conn, 'utf8');
- } else if ($DB instanceof DB_mysql) {
- mysql_set_charset('utf8', $conn);
+ if (!empty($conn)) {
+ if ($DB instanceof DB_mysqli) {
+ mysqli_set_charset($conn, 'utf8');
+ } else if ($DB instanceof DB_mysql) {
+ mysql_set_charset('utf8', $conn);
+ }
}
}
}
return $result;
}
+
}