Skip to content

Commit

Permalink
gpnf-prevent-exporting-orphaned-entries-with-gravityexport.php: Fix…
Browse files Browse the repository at this point in the history
…ed issue where non-child-entries would not be exported.
  • Loading branch information
spivurno authored Feb 5, 2025
1 parent d5199e0 commit 37691cb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
add_filter( 'gfexcel_output_rows', function( $rows ) {
for ( $i = count( $rows ) - 1; $i >= 0; $i-- ) {
foreach ( $rows[ $i ] as $row_value ) {
if ( $row_value->getField()->id == 'gpnf_entry_parent' && ! is_numeric( $row_value->getValue() ) ) {
if ( $row_value && $row_value->getField()->id == 'gpnf_entry_parent' && $row_value->getValue() && ! is_numeric( $row_value->getValue() ) ) {
unset( $rows[ $i ] );
}
}
Expand Down

0 comments on commit 37691cb

Please sign in to comment.