Replace inadequate $dbh->ping SQLite implementation (RT#78420)
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Row.pm
index edc4b1c..1bfb38f 100644 (file)
@@ -1173,6 +1173,19 @@ sub inflate_result {
 
     my @pre_objects;
     for my $me_pref (@pre_vals) {
+
+        # FIXME - this should not be necessary
+        # the collapser currently *could* return bogus elements with all
+        # columns set to undef
+        my $has_def;
+        for (values %{$me_pref->[0]}) {
+          if (defined $_) {
+            $has_def++;
+            last;
+          }
+        }
+        next unless $has_def;
+
         push @pre_objects, $pre_source->result_class->inflate_result(
           $pre_source, @$me_pref
         );