fixup output of object attributes in db error code
This commit is contained in:
parent
22310d17a4
commit
8d5c2b3129
10
lib/util.php
10
lib/util.php
@ -57,11 +57,11 @@ function common_init_language()
|
|||||||
// we can set in another locale that may not be set up
|
// we can set in another locale that may not be set up
|
||||||
// (say, ga_ES for Galego/Galician) it seems to take it.
|
// (say, ga_ES for Galego/Galician) it seems to take it.
|
||||||
common_init_locale("en_US");
|
common_init_locale("en_US");
|
||||||
|
|
||||||
$language = common_language();
|
$language = common_language();
|
||||||
$locale_set = common_init_locale($language);
|
$locale_set = common_init_locale($language);
|
||||||
setlocale(LC_CTYPE, 'C');
|
setlocale(LC_CTYPE, 'C');
|
||||||
|
|
||||||
// So we do not have to make people install the gettext locales
|
// So we do not have to make people install the gettext locales
|
||||||
$path = common_config('site','locale_path');
|
$path = common_config('site','locale_path');
|
||||||
bindtextdomain("statusnet", $path);
|
bindtextdomain("statusnet", $path);
|
||||||
@ -1112,7 +1112,11 @@ function common_log_objstring(&$object)
|
|||||||
$arr = $object->toArray();
|
$arr = $object->toArray();
|
||||||
$fields = array();
|
$fields = array();
|
||||||
foreach ($arr as $k => $v) {
|
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) . ']';
|
$objstring = $object->tableName() . '[' . implode(',', $fields) . ']';
|
||||||
return $objstring;
|
return $objstring;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user