diff options
author | Evan Prodromou <evan@status.net> | 2009-11-10 14:06:30 -0500 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2009-11-10 14:06:30 -0500 |
commit | 8d5c2b3129a1d7cefd78e311d5cbbe9ab426bb72 (patch) | |
tree | 6471a4812399d0871599986f783bb5fe0f0a6442 /lib/util.php | |
parent | 22310d17a4886d5382832caee43da0bcf7914419 (diff) |
fixup output of object attributes in db error code
Diffstat (limited to 'lib/util.php')
-rw-r--r-- | lib/util.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/util.php b/lib/util.php index b4f5af1af..0ed0688eb 100644 --- a/lib/util.php +++ b/lib/util.php @@ -57,11 +57,11 @@ function common_init_language() // we can set in another locale that may not be set up // (say, ga_ES for Galego/Galician) it seems to take it. common_init_locale("en_US"); - + $language = common_language(); $locale_set = common_init_locale($language); setlocale(LC_CTYPE, 'C'); - + // So we do not have to make people install the gettext locales $path = common_config('site','locale_path'); bindtextdomain("statusnet", $path); @@ -1112,7 +1112,11 @@ function common_log_objstring(&$object) $arr = $object->toArray(); $fields = array(); foreach ($arr as $k => $v) { - $fields[] = "$k='$v'"; + if (is_object($v)) { + $fields[] = "$k='".get_class($v)."'"; + } else { + $fields[] = "$k='$v'"; + } } $objstring = $object->tableName() . '[' . implode(',', $fields) . ']'; return $objstring; |