[PHP] Fix path munging when package is absent (#33126)

Cloning https://github.com/grpc/grpc/pull/33124 to workaround a CLA bot
issue.
pull/33139/head
Esun Kim 2 years ago committed by GitHub
parent 997af8d073
commit e7a67ee224
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/compiler/php_generator_helpers.h

@ -60,8 +60,10 @@ inline std::string GetPHPServiceFilename(
<< grpc_generator::CapitalizeFirstLetter(tokens[i]);
}
}
return oss.str() + "/" +
GetPHPServiceClassname(service, class_suffix, is_server) + ".php";
std::string path = oss.str();
if (!path.empty()) path += "/";
path += GetPHPServiceClassname(service, class_suffix, is_server) + ".php";
return path;
}
// Get leading or trailing comments in a string. Comment lines start with "// ".

Loading…
Cancel
Save