You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you use this library outside an object you cannot use $this because it's used to access members or functions of that object.
You should use something like the following:
Fatal error: Uncaught Error: Using $this when not in object context
php 8.1
try {
$resultaten = $this->client->search($query);
foreach ($resultaten->getResultaten() as $searchResult) {
// do something with $searchResult
}
} catch(NotFoundException | ApiException $exception) {
// handle error
}
The text was updated successfully, but these errors were encountered: