diff --git a/src/google/protobuf/compiler/php/php_generator.cc b/src/google/protobuf/compiler/php/php_generator.cc index 09d9fb3d9a..f896d4e187 100644 --- a/src/google/protobuf/compiler/php/php_generator.cc +++ b/src/google/protobuf/compiler/php/php_generator.cc @@ -220,7 +220,7 @@ std::string DefaultForField(const FieldDescriptor* field) { } std::string DeprecatedConditionalForField(const FieldDescriptor* field) { - if (field->is_repeated() || field->is_map()) { + if (field->is_repeated()) { return absl::StrCat("$this->", field->name(), "->count() !== 0"); } if (field->real_containing_oneof() != nullptr) {