Permalink
Browse files

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

  • Loading branch information...
1 parent 06109a2 commit fc499ac48f9caa7e99d656f64c25b64d13348f98 @markstory markstory committed Feb 17, 2010
Showing with 3 additions and 3 deletions.
  1. +3 −3 cake/libs/model/datasources/dbo_source.php
View
6 cake/libs/model/datasources/dbo_source.php
@@ -380,12 +380,12 @@ function field($name, $sql) {
* @return string SQL field
*/
function name($data) {
- if ($data == '*') {
- return '*';
- }
if (is_object($data) && isset($data->type)) {
return $data->value;
}
+ if ($data == '*') {
+ return '*';
+ }
$array = is_array($data);
$data = (array)$data;
$count = count($data);

0 comments on commit fc499ac

Please sign in to comment.