Reversing order of short cut checks. Fixes issues in PHP 5.1.x. Fixes #351

This commit is contained in:
Mark Story 2010-02-16 22:05:50 -05:00
parent 06109a2eed
commit fc499ac48f

View file

@ -380,12 +380,12 @@ class DboSource extends DataSource {
* @return string SQL field * @return string SQL field
*/ */
function name($data) { function name($data) {
if ($data == '*') {
return '*';
}
if (is_object($data) && isset($data->type)) { if (is_object($data) && isset($data->type)) {
return $data->value; return $data->value;
} }
if ($data == '*') {
return '*';
}
$array = is_array($data); $array = is_array($data);
$data = (array)$data; $data = (array)$data;
$count = count($data); $count = count($data);