Skip to content

Commit

Permalink
Strict check for defined variable
Browse files Browse the repository at this point in the history
Closes #558
  • Loading branch information
goetas committed Apr 11, 2017
1 parent e7a88dc commit fb93c72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/JMS/Serializer/Annotation/SerializedName.php
Expand Up @@ -30,7 +30,7 @@ final class SerializedName

public function __construct(array $values)
{
if ( ! is_string($values['value'])) {
if (!isset($values['value']) || !is_string($values['value'])) {
throw new RuntimeException(sprintf('"value" must be a string.'));
}

Expand Down

0 comments on commit fb93c72

Please sign in to comment.