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
Some generated the Schema classes have the nullable option (?) in constructor but they don't have nullable in the property definition. For instance, the ExtractUrlIndexingResults in AppSearch\Schema :
namespaceElastic\EnterpriseSearch\AppSearch\Schema;
/** * @generated This file is generated, please do not edit */classExtractUrlIndexingResults
{
publicstring$document_id;
publicobject$document_fields;
publicfunction__construct(?string$document_id, ?object$document_fields)
{
$this->document_id = $document_id;
$this->document_fields = $document_fields;
}
}
In this example, the $document_id and the $document_fields properties will generate a FATAL error when set to null.
The FATAL error at runtime will be PHP Fatal error: Uncaught TypeError: Cannot assign null to property.
We need to fix this adding nullable also in the definition, as follows:
namespaceElastic\EnterpriseSearch\AppSearch\Schema;
/** * @generated This file is generated, please do not edit */classExtractUrlIndexingResults
{
public ?string$document_id;
public ?object$document_fields;
publicfunction__construct(?string$document_id, ?object$document_fields)
{
$this->document_id = $document_id;
$this->document_fields = $document_fields;
}
}
The text was updated successfully, but these errors were encountered:
Some generated the Schema classes have the nullable option (?) in constructor but they don't have nullable in the property definition. For instance, the ExtractUrlIndexingResults in
AppSearch\Schema
:In this example, the
$document_id
and the$document_fields
properties will generate a FATAL error when set tonull
.The FATAL error at runtime will be
PHP Fatal error: Uncaught TypeError: Cannot assign null to property
.We need to fix this adding nullable also in the definition, as follows:
The text was updated successfully, but these errors were encountered: