Merge pr 4631: const char* -> const std::string&

Merge pr #4631