lua/api: ensure the function name in the debug output is non-null

NULL crashes the journald writer
This commit is contained in:
George Kiagiadakis
2021-02-18 12:24:01 +02:00
parent 98151fdb69
commit cb8a8936aa

View File

@@ -183,6 +183,7 @@ log_log (lua_State *L, GLogLevelFlags lvl)
message = luaL_checkstring (L, index);
sprintf (line_str, "%d", ar.currentline);
ar.name = ar.name ? ar.name : "chunk";
wp_log_structured_standard (G_LOG_DOMAIN, lvl,
ar.source, line_str, ar.name, type, instance, "%s", message);