@@ -517,6 +517,8 @@ public function patch( $args, $assoc_args ) {
517517 $ group = Utils \get_flag_value ( $ assoc_args , 'group ' );
518518 $ expiration = Utils \get_flag_value ( $ assoc_args , 'expiration ' );
519519
520+ \WP_CLI ::log ( var_export ( [ $ action , $ key ], true ) );
521+
520522 $ key_path = array_map (
521523 function ( $ key ) {
522524 if ( is_numeric ( $ key ) && ( (string ) intval ( $ key ) === $ key ) ) {
@@ -528,14 +530,20 @@ function ( $key ) {
528530 array_slice ( $ args , 2 )
529531 );
530532
533+ \WP_CLI ::log ( var_export ( $ key_path , true ) );
534+
531535 if ( 'delete ' === $ action ) {
532536 $ patch_value = null ;
533537 } elseif ( \WP_CLI \Entity \Utils::has_stdin () ) {
534538 $ stdin_value = WP_CLI ::get_value_from_arg_or_stdin ( $ args , - 1 );
535539 $ patch_value = WP_CLI ::read_value ( trim ( $ stdin_value ), $ assoc_args );
540+ \WP_CLI ::log ( 'STDIN : ' . var_export ( $ key_path , true ) );
541+ \WP_CLI ::log ( 'STDIN : ' . var_export ( $ patch_value , true ) );
536542 } else {
537543 // Take the patch value as the last positional argument. Mutates $key_path to be 1 element shorter!
538544 $ patch_value = WP_CLI ::read_value ( array_pop ( $ key_path ), $ assoc_args );
545+ \WP_CLI ::log ( 'NO STDIN : ' . var_export ( $ key_path , true ) );
546+ \WP_CLI ::log ( 'NO STDIN : ' . var_export ( $ patch_value , true ) );
539547 }
540548
541549 /* Need to make a copy of $current_value here as it is modified by reference */
0 commit comments