Skip to content

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

@benknight

Description

@benknight

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions