{"action":"closed","issue":{"url":"https://api.github.com/repos/googleapis/google-api-php-client/issues/1447","repository_url":"https://api.github.com/repos/googleapis/google-api-php-client","labels_url":"https://api.github.com/repos/googleapis/google-api-php-client/issues/1447/labels{/name}","comments_url":"https://api.github.com/repos/googleapis/google-api-php-client/issues/1447/comments","events_url":"https://api.github.com/repos/googleapis/google-api-php-client/issues/1447/events","html_url":"https://github.com/googleapis/google-api-php-client/issues/1447","id":331112691,"node_id":"MDU6SXNzdWUzMzExMTI2OTE=","number":1447,"title":"It's give undefined index description for images when description is null","user":{"login":"shahzeyb","id":40166049,"node_id":"MDQ6VXNlcjQwMTY2MDQ5","avatar_url":"https://avatars3.githubusercontent.com/u/40166049?v=4","gravatar_id":"","url":"https://api.github.com/users/shahzeyb","html_url":"https://github.com/shahzeyb","followers_url":"https://api.github.com/users/shahzeyb/followers","following_url":"https://api.github.com/users/shahzeyb/following{/other_user}","gists_url":"https://api.github.com/users/shahzeyb/gists{/gist_id}","starred_url":"https://api.github.com/users/shahzeyb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shahzeyb/subscriptions","organizations_url":"https://api.github.com/users/shahzeyb/orgs","repos_url":"https://api.github.com/users/shahzeyb/repos","events_url":"https://api.github.com/users/shahzeyb/events{/privacy}","received_events_url":"https://api.github.com/users/shahzeyb/received_events","type":"User","site_admin":false},"labels":[{"id":776094955,"node_id":"MDU6TGFiZWw3NzYwOTQ5NTU=","url":"https://api.github.com/repos/googleapis/google-api-php-client/labels/priority:%20p2","name":"priority: p2","color":"fef2c0","default":false},{"id":52387637,"node_id":"MDU6TGFiZWw1MjM4NzYzNw==","url":"https://api.github.com/repos/googleapis/google-api-php-client/labels/type:%20bug","name":"type: bug","color":"db4437","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-06-11T09:32:55Z","updated_at":"2018-10-23T19:02:30Z","closed_at":"2018-10-23T19:02:29Z","author_association":"NONE","body":"Following is for web detection and remote Image\r\ni have following code. it works for remote images but fails on some. when image description is null.\r\n```php\r\n $vision = new \\Vision\\Vision(\r\n                     $key',\r\n                     [\r\n                         // See a list of all features in the table below\r\n                         // Feature, Limit\r\n                         new \\Vision\\Feature(\\Vision\\Feature::WEB_DETECTION, 100),\r\n                     ]\r\n                 );\r\n                 $response = $vision->request(\r\n                 // See a list of all image loaders in the table below\r\n                     new \\Vision\\Request\\Image\\RemoteImage($imagePath)\r\n                 );\r\n```\r\nwhen it reaches at $response. If image description is null then it gives error undefined index description. \r\nthe error comes from file WebEntitiesStrategies line 35 method hydrate.\r\n```php\r\n  public function hydrate($value)\r\n    {\r\n        $webEntities = [];\r\n\r\n        foreach ($value as $webEntityInfo) {\r\n            $webEntities[] = new WebEntity($webEntityInfo['entityId'], $webEntityInfo['description'], isset($webEntityInfo['score']) ? $webEntityInfo['score'] : null);\r\n        }\r\n\r\n        return $webEntities;\r\n    }\r\n```\r\n\r\ni think this should be  following\r\n```php\r\n public function hydrate($value)\r\n    {\r\n        $webEntities = [];\r\n\r\n        foreach ($value as $webEntityInfo) {\r\n            $webEntities[] = new WebEntity($webEntityInfo['entityId'],isset( $webEntityInfo['description']), isset($webEntityInfo['score']) ? $webEntityInfo['score'] : null);\r\n        }\r\n\r\n        return $webEntities;\r\n    }\r\n ```\r\n\r\nMW edits: PHP quotes"}}
{"actor":{"display_login":"mattwhisenhunt"}}