Skip to content

Commit 37691cb

Browse files
authored
gpnf-prevent-exporting-orphaned-entries-with-gravityexport.php: Fixed issue where non-child-entries would not be exported.
1 parent d5199e0 commit 37691cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gp-nested-forms/gpnf-prevent-exporting-orphaned-entries-with-gravityexport.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
add_filter( 'gfexcel_output_rows', function( $rows ) {
1515
for ( $i = count( $rows ) - 1; $i >= 0; $i-- ) {
1616
foreach ( $rows[ $i ] as $row_value ) {
17-
if ( $row_value->getField()->id == 'gpnf_entry_parent' && ! is_numeric( $row_value->getValue() ) ) {
17+
if ( $row_value && $row_value->getField()->id == 'gpnf_entry_parent' && $row_value->getValue() && ! is_numeric( $row_value->getValue() ) ) {
1818
unset( $rows[ $i ] );
1919
}
2020
}

0 commit comments

Comments
 (0)