From 410c018e5398fd52cf67dba20cb22f25c4e36517 Mon Sep 17 00:00:00 2001 From: gggeek <giunta.gaetano@gmail.com> Date: Sat, 2 Jan 2021 15:17:40 +0000 Subject: [PATCH] reinstate access to xmlrpc_server->dmap (for users of the v3 API) --- lib/xmlrpcs.inc | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/lib/xmlrpcs.inc b/lib/xmlrpcs.inc index df6b047f..33043f14 100644 --- a/lib/xmlrpcs.inc +++ b/lib/xmlrpcs.inc @@ -57,6 +57,32 @@ class xmlrpc_server extends Server $r = new PhpXmlRpc\Response(new PhpXmlRpc\Value("'Aha said I: '" . file_get_contents('php://input'), 'string')); print $r->serialize(); } + + /** + * Reinstate access to class members which became protected/private + * @param string $name + * @return mixed + */ + public function __get($name) + { + switch($name) { + case 'dmap': + return $this->dmap; + default: + trigger_error('Undefined property via __get(): ' . $name . ' in ' . $trace[0]['file'] . ' on line ' . + $trace[0]['line'], E_USER_NOTICE); + return null; + } + } + + /** + * @param string $name + * @return bool + */ + public function __isset($name) + { + return $name === 'dmap'; + } } /* Expose as global functions the ones which are now class methods */ -- 2.47.0