From 0b282124dfcb497ed64eb773def5ccad5e3ff932 Mon Sep 17 00:00:00 2001 From: Ryan Kanner Date: Mon, 6 Nov 2017 12:18:45 -0700 Subject: [PATCH 1/2] fixes #44 php error when retrieving keys --- includes/cli.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/cli.php b/includes/cli.php index d9f7ee9..1b457bb 100644 --- a/includes/cli.php +++ b/includes/cli.php @@ -246,6 +246,8 @@ public function delete( $args, $assoc_args ) { foreach ( $modifiers as $modifier ) { + WP_CLI::log( $transient_name . ' ' . $modifier ); + dfm_delete_transient( $transient_name, $modifier ); if ( isset( $progress ) ) { @@ -414,7 +416,7 @@ private function format_output( $transients, $assoc_args ) { if ( ! empty( $assoc_args['fields'] ) ) { if ( is_string( $assoc_args['fields'] ) ) { - $fields = explode( ',', $assoc_args ); + $fields = explode( ',', $assoc_args['fields'] ); } else { $fields = $assoc_args['fields']; } From 44a2ef3ec303f0a4441d1c8560966c26125320a1 Mon Sep 17 00:00:00 2001 From: Ryan Kanner Date: Mon, 6 Nov 2017 12:20:44 -0700 Subject: [PATCH 2/2] removing some debug code --- includes/cli.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/includes/cli.php b/includes/cli.php index 1b457bb..deca0b0 100644 --- a/includes/cli.php +++ b/includes/cli.php @@ -246,8 +246,6 @@ public function delete( $args, $assoc_args ) { foreach ( $modifiers as $modifier ) { - WP_CLI::log( $transient_name . ' ' . $modifier ); - dfm_delete_transient( $transient_name, $modifier ); if ( isset( $progress ) ) {