Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
benknight opened this issue Jun 19, 2013 · 1 comment

Comments

@benknight
Copy link

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
Copy link
Author

Yeah? Does this make sense?

zhzheng added a commit to zhzheng/Workflows that referenced this issue Dec 31, 2021
PHP Deprecated:  SimpleXMLElement::addAttribute(): Passing null to parameter jdfwarrior#2 ($value) of type ?string is deprecated in ...
mikemcduffie added a commit to mikemcduffie/workflows.php that referenced this issue Nov 11, 2023
Fix bug: 
    Deprecated: SimpleXMLElement::addAttribute(): Passing null to parameter jdfwarrior#2 ($value) of type string is deprecated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant