diff --git a/src/codegen.inc.php b/src/codegen.inc.php index c0c1576..5124911 100644 --- a/src/codegen.inc.php +++ b/src/codegen.inc.php @@ -347,7 +347,7 @@ function var_reset($name, \mtgType $type, $default = null) foreach($default as $k => $v) { $kf = $type->getField($k); - $str .= var_reset("$name." . $kf->name, $kf->getType(), $v); + $str .= var_reset("$name." . $kf->getName(), $kf->getType(), $v); } } }