php-hal-client
php-hal-client copied to clipboard
Fix Resource::hasProperty()
It is incorrect to check property by isset(), because it may be property with null value. The better way is replace line 183 with this code:
return array_key_exists($name, $this->properties);
Can you create a PR ?
For performance :
return isset($this->properties[$name]) || array_key_exists($name, $this->properties);
@rande may be leter.
@pokap your syntax is harder to read and there is no high performance improvement.