Skip to content

Commit

Permalink
Fix PHP notice if entry does not exist with GP Populate Anything Hydr…
Browse files Browse the repository at this point in the history
…ation
  • Loading branch information
jakejackson1 committed May 13, 2024
1 parent fa8ad3e commit 959dc7b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Model/Model_PDF.php
Original file line number Diff line number Diff line change
Expand Up @@ -2503,7 +2503,11 @@ function( $item ) use ( $form ) {
*/
public function gp_populate_anything_hydrate_form( $form, $entry ) {
static $cache = [];
$key = $form['id'] . $entry['id'];

$form_id = $form['id'] ?? '';
$entry_id = $entry['id'] ?? '';

$key = $form_id . $entry_id;

if ( isset( $cache[ $key ] ) ) {
return $cache[ $key ];
Expand Down

0 comments on commit 959dc7b

Please sign in to comment.