Whichever version of CFWheels their site originated from doesn't seem to be relevant here. It's an implementation bug in CFWheels as far as I can tell.
The code that's erroring is this:
public any function $createObjectFromRoot(required string path, required string fileName, required string method) {
local.returnVariable = "local.rv";
local.method = arguments.method;
local.component = ListChangeDelims(arguments.path, ".", "/") & "." & ListChangeDelims(arguments.fileName, ".", "/");
local.argumentCollection = arguments;
include "../../root.cfm";
return local.rv; // <------------------- THIS LINE HERE
}
There is no guarantee in this function that local.rv will exist. It's sloppy coding to ass-u-me that a variable in a function will be magicked into existence by some external resource (root.cfm in this case).
local.rv should be initialised to some safe value in this function.
Now if we look at root.cfm we have this:
<cfinvoke
component="#local.component#"
method="#local.method#"
returnVariable="#local.returnVariable#" <!--- no guarantee this will end up being defined --->
argumentCollection="#local.argumentCollection#"
>
If the method being invoked is void, then you won't get a value back, and local.rv will be undefined.
Which is what the error is saying.
Given root.cfm can quite legitimately leave local.rv undefined, then $createObjectFromRoot *can't* assume it will be defined. That's a bug.
--
Adam