Skip to content

Commit

Permalink
Fix pass-by-reference
Browse files Browse the repository at this point in the history
  • Loading branch information
erayd committed Jan 19, 2017
1 parent 4a743f6 commit a002a4d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/JsonSchema/Constraints/TypeCheck/LooseTypeCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static function propertyGet($value, $property)
return $value[$property];
}

public static function propertySet($value, $property, $data)
public static function propertySet(&$value, $property, $data)
{
if (is_object($value)) {
$value->{$property} = $data;
Expand Down
2 changes: 1 addition & 1 deletion src/JsonSchema/Constraints/TypeCheck/StrictTypeCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static function propertyGet($value, $property)
return $value->{$property};
}

public static function propertySet($value, $property, $data)
public static function propertySet(&$value, $property, $data)
{
$value->{$property} = $data;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public static function isArray($value);

public static function propertyGet($value, $property);

public static function propertySet($value, $property, $data);
public static function propertySet(&$value, $property, $data);

public static function propertyExists($value, $property);

Expand Down

0 comments on commit a002a4d

Please sign in to comment.