Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Commit

Permalink
Fix for PHP 7.1 behavior when calling variable functions
Browse files Browse the repository at this point in the history
Fixes these notices and subsequent failure when initializing `new Task()`

PHP Notice:  Array to string conversion in /srv/www/inc/libraries/vendor/loopline-systems/closeio-api-wrapper/src/LooplineSystems/CloseIoApiWrapper/Library/ObjectHydrateHelperTrait.php on line 45

PHP Notice:  Undefined property: LooplineSystems\CloseIoApiWrapper\Model\Task::$Array in /srv/www/inc/libraries/vendor/loopline-systems/closeio-api-wrapper/src/LooplineSystems/CloseIoApiWrapper/Library/ObjectHydrateHelperTrait.php on line 45
  • Loading branch information
DaneEveritt committed Apr 26, 2018
1 parent 4077a06 commit 95a3969
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function hydrate(array $data, array $nestedObjects = [], array $method_ma
} else {
// check if setter method exists that doesn't match inflected filter format
if (in_array($setter, array_keys($method_mapper))) {
$this->$method_mapper[$setter]($value);
$this->{$method_mapper[$setter]}($value);
} else {
// value is not set - Entities should be extended if needed
}
Expand Down

0 comments on commit 95a3969

Please sign in to comment.