mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-12 05:22:35 +09:00
Fix undefined indices and incompatible function signatures
This commit is contained in:
parent
6c19e6ebff
commit
90084efd75
2 changed files with 5 additions and 5 deletions
|
|
@ -304,7 +304,7 @@ class Debug
|
||||||
* @param array $errcontext
|
* @param array $errcontext
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function addError($errno, $errstr, $errfile, $errline, $errcontext)
|
public static function addError($errno, $errstr, $errfile, $errline, $errcontext = [])
|
||||||
{
|
{
|
||||||
// Do not store log if disabled.
|
// Do not store log if disabled.
|
||||||
if (!self::$_enabled)
|
if (!self::$_enabled)
|
||||||
|
|
@ -597,10 +597,10 @@ class Debug
|
||||||
foreach ($backtrace as $step)
|
foreach ($backtrace as $step)
|
||||||
{
|
{
|
||||||
$stepstr = '#' . count($result) . ' ';
|
$stepstr = '#' . count($result) . ' ';
|
||||||
$stepstr .= $step['file'] . '(' . $step['line'] . ')';
|
$stepstr .= ($step['file'] ?? 'unknown') . '(' . ($step['line'] ?? 0) . ')';
|
||||||
if ($step['function'])
|
if ($step['function'])
|
||||||
{
|
{
|
||||||
$stepstr .= ': ' . ($step['type'] ? ($step['class'] . $step['type'] . $step['function']) : $step['function']) . '()';
|
$stepstr .= ': ' . ((isset($step['type']) && $step['type']) ? ($step['class'] . $step['type'] . $step['function']) : $step['function']) . '()';
|
||||||
}
|
}
|
||||||
$result[] = strtr($stepstr, "\0\r\n\t\v\e\f", ' ');
|
$result[] = strtr($stepstr, "\0\r\n\t\v\e\f", ' ');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ class DBHelper extends \PDO
|
||||||
* @param string $statement
|
* @param string $statement
|
||||||
* @return PDOStatement|DBStmtHelper
|
* @return PDOStatement|DBStmtHelper
|
||||||
*/
|
*/
|
||||||
public function query($statement)
|
public function query($statement, $fetch_mode = \PDO::FETCH_OBJ, ...$fetch_mode_args)
|
||||||
{
|
{
|
||||||
$start_time = microtime(true);
|
$start_time = microtime(true);
|
||||||
$db_class = DB::getInstance($this->_type);
|
$db_class = DB::getInstance($this->_type);
|
||||||
|
|
@ -98,7 +98,7 @@ class DBHelper extends \PDO
|
||||||
* and send query logs to the appropriate place.
|
* and send query logs to the appropriate place.
|
||||||
*/
|
*/
|
||||||
$stmt = parent::query($statement, ...$args);
|
$stmt = parent::query($statement, ...$args);
|
||||||
$stmt->setFetchMode(\PDO::FETCH_OBJ);
|
$stmt->setFetchMode($fetch_mode);
|
||||||
$stmt->setType($this->_type);
|
$stmt->setType($this->_type);
|
||||||
$db_class->clearError();
|
$db_class->clearError();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue