From 481746dff3ecde596711e0c824a9fe6bd1e043de Mon Sep 17 00:00:00 2001 From: athaller Date: Thu, 1 Aug 2019 15:39:14 -0400 Subject: [PATCH] Fixes an issue where the update command has no way of getting the id from the JSON --- includes/class-gf-cli-form-notification.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-gf-cli-form-notification.php b/includes/class-gf-cli-form-notification.php index d630e7f..20d0c00 100644 --- a/includes/class-gf-cli-form-notification.php +++ b/includes/class-gf-cli-form-notification.php @@ -422,7 +422,7 @@ function update( $args, $assoc_args ) { $found = false; foreach ( $notifications as $key => $notification ) { - if ( $notification['id'] == $notification_id ) { + if ( $notification['id'] == $notification_id || $notifications['id'] == $new_notification['id'] ) { $notifications[ $key ] = $new_notification; $found = true; break;