[PHP] Don't generate code referencing undefined $r

This could happen in overloaded methods which returned void and took at
least one const std::string& parameter.
This commit is contained in:
Olly Betts 2019-02-08 18:09:52 +13:00
commit 3f9ebb31b9
4 changed files with 26 additions and 1 deletions

View file

@ -979,7 +979,7 @@ public:
/* Insert argument output code */
bool hasargout = false;
for (i = 0, p = l; p; i++) {
if ((tm = Getattr(p, "tmap:argout"))) {
if ((tm = Getattr(p, "tmap:argout")) && Len(tm)) {
hasargout = true;
Replaceall(tm, "$source", Getattr(p, "lname"));
// Replaceall(tm,"$input",Getattr(p,"lname"));