Merge branch 'develop' into patch-11
This commit is contained in:
commit
2e6c2528cb
2 changed files with 20 additions and 2 deletions
|
|
@ -358,7 +358,7 @@ class DoliDBMysqli extends DoliDB
|
|||
if (getDolGlobalInt('SYSLOG_LEVEL') < LOG_DEBUG) {
|
||||
dol_syslog(get_class($this)."::query SQL Error query: ".$query, LOG_ERR); // Log of request was not yet done previously
|
||||
}
|
||||
dol_syslog(get_class($this)."::query SQL Error message: ".$this->lasterrno." ".$this->lasterror, LOG_ERR);
|
||||
dol_syslog(get_class($this)."::query SQL Error message: ".$this->lasterrno." ".$this->lasterror.self::getCallerInfoString(), LOG_ERR);
|
||||
//var_dump(debug_print_backtrace());
|
||||
}
|
||||
$this->lastquery = $query;
|
||||
|
|
@ -368,6 +368,24 @@ class DoliDBMysqli extends DoliDB
|
|||
return $ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get caller info
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
final protected static function getCallerInfoString()
|
||||
{
|
||||
$backtrace = debug_backtrace();
|
||||
$msg = "";
|
||||
if (count($backtrace) >= 1) {
|
||||
$trace = $backtrace[1];
|
||||
if (isset($trace['file'], $trace['line'])) {
|
||||
$msg = " From {$trace['file']}:{$trace['line']}.";
|
||||
}
|
||||
}
|
||||
return $msg;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Returns the current line (as an object) for the resultset cursor
|
||||
|
|
|
|||
|
|
@ -4516,7 +4516,7 @@ function getPictoForType($key)
|
|||
* @param int $notitle 1=Disable tag title. Use it if you add js tooltip, to avoid duplicate tooltip.
|
||||
* @param string $alt Force alt for bind people
|
||||
* @param string $morecss Add more class css on img tag (For example 'myclascss').
|
||||
* @param string $marginleftonlyshort 1 = Add a short left margin on picto, 2 = Add a larger left margin on picto, 0 = No margin left. Works for fontawesome picto only.
|
||||
* @param int $marginleftonlyshort 1 = Add a short left margin on picto, 2 = Add a larger left margin on picto, 0 = No margin left. Works for fontawesome picto only.
|
||||
* @return string Return img tag
|
||||
* @see img_object(), img_picto_common()
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue