File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -825,10 +825,6 @@ private function get_transient_value_type( $transient ) {
825825 if ( is_array ( $ value ) ) {
826826 $ type = esc_html__ ( 'array ' , 'transients-manager ' );
827827
828- // JSON
829- } elseif ( is_object ( json_decode ( $ value ) ) ) {
830- $ type = esc_html__ ( 'json ' , 'transients-manager ' );
831-
832828 // Object
833829 } elseif ( is_object ( $ value ) ) {
834830 $ type = esc_html__ ( 'object ' , 'transients-manager ' );
@@ -859,6 +855,11 @@ private function get_transient_value_type( $transient ) {
859855 $ type = esc_html__ ( 'numeric ' , 'transients-manager ' );
860856 }
861857
858+ // JSON
859+ } elseif ( is_string ( $ value ) && is_object ( json_decode ( $ value ) ) ) {
860+ $ type = esc_html__ ( 'json ' , 'transients-manager ' );
861+
862+ // Scalar
862863 } else {
863864 $ type = esc_html__ ( 'scalar ' , 'transients-manager ' );
864865 }
You can’t perform that action at this time.
0 commit comments