mattiabasone commented on code in PR #3634:
URL: https://github.com/apache/avro/pull/3634#discussion_r2729314597
##########
lang/php/lib/Datum/AvroIODatumReader.php:
##########
@@ -490,18 +499,18 @@ public function readDefaultValue(AvroSchema
$field_schema, mixed $default_value)
case AvroSchema::UNION_SCHEMA:
return $this->readDefaultValue(
/** @phpstan-ignore method.notFound */
- $field_schema->schemaByIndex(0),
- $default_value
+ $fieldSchema->schemaByIndex(0),
+ $defaultValue
);
case AvroSchema::ENUM_SCHEMA:
case AvroSchema::FIXED_SCHEMA:
- return $default_value;
+ return $defaultValue;
case AvroSchema::RECORD_SCHEMA:
$record = [];
/** @phpstan-ignore method.notFound */
- foreach ($field_schema->fields() as $field) {
+ foreach ($fieldSchema->fields() as $field) {
$field_name = $field->name();
- if (!$json_val = $default_value[$field_name]) {
+ if (!$json_val = $defaultValue[$field_name]) {
Review Comment:
uhm, it's wrong, nice catch.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]