Fix failing test and some warnings
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / CDBICompat / ColumnCase.pm
index eb4b0c0..13bec9c 100644 (file)
@@ -25,9 +25,15 @@ sub has_a {
 
 sub has_many {
   my ($class, $rel, $f_class, $f_key, @rest) = @_;
-  return $class->next::method($rel, $f_class, ( ref($f_key) ?
-                                                          $f_key :
-                                                          lc($f_key) ), @rest);
+  return $class->next::method(
+    $rel,
+    $f_class,
+    (ref($f_key) ?
+      $f_key :
+      lc($f_key||'')
+    ),
+    @rest
+  );
 }
 
 sub get_inflated_column {