Workflows icon indicating copy to clipboard operation
Workflows copied to clipboard

Calling Workflow::read with second arg as true doesn't return an associative array.

Open benknight opened this issue 12 years ago • 1 comments

There's a bug in this logic in workflows.php:

$out = file_get_contents( $a );
if ( !is_null( json_decode( $out ) ) && !$array ):
    $out = json_decode( $out );
elseif ( !is_null( json_decode( $out ) ) && !$array ):
    $out = json_decode( $out, true );
endif;

The if and elseif are checking the exact same condition, verbatim. I believe the fix would be removing the bang (!) that's in front of $array in the elseif condition.

benknight avatar Jun 19 '13 16:06 benknight

Yeah? Does this make sense?

benknight avatar Nov 16 '13 09:11 benknight