We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6e8d15e commit eb2161dCopy full SHA for eb2161d
vision/src/detect_web_with_geo_metadata.php
@@ -43,7 +43,7 @@ function detect_web_with_geo_metadata($path)
43
$response = $imageAnnotator->webDetection($image, ['imageContext' => $imageContext]);
44
$web = $response->getWebDetection();
45
46
- if ($web->getWebEntities()) {
+ if ($web && $web->getWebEntities()) {
47
printf('%d web entities found:' . PHP_EOL,
48
count($web->getWebEntities()));
49
foreach ($web->getWebEntities() as $entity) {
0 commit comments