Merge pull request #10262 from sirtoobii/patch-1

Fixed $Debug to finally show available methods
This commit is contained in:
Steve Boyd 2022-05-18 13:14:10 +12:00 committed by GitHub
commit 19dcf477a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,10 +50,8 @@ class ViewableData_Debugger extends ViewableData
// debugging information for the entire class
$reflector = new ReflectionObject($this->object);
$debug = "<b>Debugging Information: all methods available in '{$class}'</b><br/><ul>";
foreach ($this->object->allMethodNames() as $method) {
// check that the method is public
if ($method[0] === strtoupper($method[0] ?? '') && $method[0] != '_') {
if ($method[0] !== '_') {
if ($reflector->hasMethod($method) && $method = $reflector->getMethod($method)) {
if ($method->isPublic()) {
$debug .= "<li>\${$method->getName()}";