Closed matjazpotocnik closed 3 years ago
Thanks @matjazpotocnik - I actually already have a fix for that in place here, just not committed yet.
if($toMethod instanceof \Closure) {
$rc = new \ReflectionFunction($toMethod);
}
*elseif($hook['toObject']) {*
if(method_exists("\ProcessWire\\$toObject", $toMethod)) {
$rc = new \ReflectionMethod("\ProcessWire\\$toObject", $toMethod);
}
Change the line between the asterisks.
This error was initially introduced when I was working with @BernhardBaumrock on a feature request. I had things kinda working how he wanted, but I think last I heard he wanted to make some further changes. Bernhard - did you ever get this working as you wanted?
Sorry for the delay on this, but I was not able to work on it yet. I'm working on different projects now that seem to have a different setup... so the 0::xxx did not appear at all. Sorry for the troubles!
I changed the line, no more warnings
@matjazpotocnik - this should be fixed in the latest version, but please reopen if you still have issues.
Hi Adrian!
I'm getting strange warning in this line in DebugModePanel.php
$ro = new \ReflectionObject($toObject);
I used this to debug:
if(is_string($toObject)) bd($toObject);
and $toObjecs is an empty string (''). Not sure how this happened...