neoxygen / neo4j-neoclient

Simple PHP HttpClient for the Neo4j ReST API with Multi DB Support
MIT License
121 stars 138 forks source link

Relationship->getProperty is either true of null #23

Closed JackieXu closed 9 years ago

JackieXu commented 9 years ago

The following line:

$value = isset($this->properties[$name]) ?: null;

will always evaluate to true or null.

Leaving out the middle part of PHP's ternary operator will make it equal to the first part, which is a boolean. I can send in a pull request, but I don't know where and how you would want those.

The following should work:

$value = isset($this->properties[$name]) ? $this->properties[$name] : null;
JackieXu commented 9 years ago

Oh, missed that it was already fixed in 1.7. My bad.

JackieXu commented 9 years ago

Sorry for spamming, but the issue still appears to exist.

ikwattro commented 9 years ago

ha, I will check it. Thanks for reporting

ikwattro commented 9 years ago

Fixed and new release 2.0.10 .

Thanks again.