mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-01 00:03:18 +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;
|
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
|
* Logger class for LSlog
|
||||||
*
|
*
|
||||||
* @author Benjamin Renard <brenard@easter-eggs.com>
|
* @author Benjamin Renard <brenard@easter-eggs.com>
|
||||||
*/
|
*/
|
||||||
class LSlog_logger {
|
class LSlog_logger extends LSlog_staticLoggerClass {
|
||||||
|
|
||||||
// Name
|
// Name
|
||||||
private $name;
|
private $name;
|
||||||
|
@ -95,6 +97,8 @@ class LSlog_logger {
|
||||||
case 'level':
|
case 'level':
|
||||||
return $this -> level;
|
return $this -> level;
|
||||||
}
|
}
|
||||||
|
// Unknown key, log warning
|
||||||
|
self :: log_warning("$this -> __get($key): invalid property requested\n".LSlog :: get_debug_backtrace_context());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -122,6 +122,8 @@ class LSrelation extends LSlog_staticLoggerClass {
|
||||||
$this -> getConfig('linkAttribute', false)
|
$this -> getConfig('linkAttribute', false)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
// Unknown key, log warning
|
||||||
|
self :: log_warning("__get($key): invalid property requested\n".LSlog :: get_debug_backtrace_context());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -253,11 +253,10 @@ class LSsearchEntry extends LSlog_staticLoggerClass {
|
||||||
else
|
else
|
||||||
self :: log_error("__get($key): custom info function is not callable: ".varDump($this->params['customInfos'][$key]['function']));
|
self :: log_error("__get($key): custom info function is not callable: ".varDump($this->params['customInfos'][$key]['function']));
|
||||||
}
|
}
|
||||||
else {
|
// Unknown key, log warning
|
||||||
self :: log_warning('LSsearchEntry : '.$this -> dn.' => Unknown property '.$key.' !');
|
self :: log_warning("$this -> __get($key): invalid property requested\n".LSlog :: get_debug_backtrace_context());
|
||||||
return __("Unknown property !");
|
return __("Unknown property !");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return a configuration parameter (or default value)
|
* Return a configuration parameter (or default value)
|
||||||
|
|
|
@ -65,6 +65,8 @@ class LSurlRequest {
|
||||||
if (array_key_exists($key, $this->url_params)) {
|
if (array_key_exists($key, $this->url_params)) {
|
||||||
return urldecode($this->url_params[$key]);
|
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