mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-12-23 00:43:48 +01:00
Add warning on unknown key requested using __get methods
This commit is contained in:
parent
d0d3e944ed
commit
be04b6becf
5 changed files with 14 additions and 5 deletions
|
@ -1841,6 +1841,8 @@ class LSldapObject extends LSlog_staticLoggerClass {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
// Unknown key, log warning
|
||||
self :: log_warning("__get($key): invalid property requested\n".LSlog :: get_debug_backtrace_context());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -20,12 +20,14 @@
|
|||
|
||||
******************************************************************************/
|
||||
|
||||
LSsession :: loadLSclass('LSlog_staticLoggerClass');
|
||||
|
||||
/**
|
||||
* Logger class for LSlog
|
||||
*
|
||||
* @author Benjamin Renard <brenard@easter-eggs.com>
|
||||
*/
|
||||
class LSlog_logger {
|
||||
class LSlog_logger extends LSlog_staticLoggerClass {
|
||||
|
||||
// Name
|
||||
private $name;
|
||||
|
@ -95,6 +97,8 @@ class LSlog_logger {
|
|||
case 'level':
|
||||
return $this -> level;
|
||||
}
|
||||
// Unknown key, log warning
|
||||
self :: log_warning("$this -> __get($key): invalid property requested\n".LSlog :: get_debug_backtrace_context());
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -122,6 +122,8 @@ class LSrelation extends LSlog_staticLoggerClass {
|
|||
$this -> getConfig('linkAttribute', false)
|
||||
);
|
||||
}
|
||||
// Unknown key, log warning
|
||||
self :: log_warning("__get($key): invalid property requested\n".LSlog :: get_debug_backtrace_context());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -253,10 +253,9 @@ class LSsearchEntry extends LSlog_staticLoggerClass {
|
|||
else
|
||||
self :: log_error("__get($key): custom info function is not callable: ".varDump($this->params['customInfos'][$key]['function']));
|
||||
}
|
||||
else {
|
||||
self :: log_warning('LSsearchEntry : '.$this -> dn.' => Unknown property '.$key.' !');
|
||||
return __("Unknown property !");
|
||||
}
|
||||
// Unknown key, log warning
|
||||
self :: log_warning("$this -> __get($key): invalid property requested\n".LSlog :: get_debug_backtrace_context());
|
||||
return __("Unknown property !");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -65,6 +65,8 @@ class LSurlRequest {
|
|||
if (array_key_exists($key, $this->url_params)) {
|
||||
return urldecode($this->url_params[$key]);
|
||||
}
|
||||
// Unknown key, log warning
|
||||
self :: log_warning("__get($key): invalid property requested\n".LSlog :: get_debug_backtrace_context());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue