php - Debug bar doubling up on queries?

I'm slightly confused by the CI4 debug bar. I've noticed that for some reason it is doubling up on all queries which appear in the output, even though when I go into the MySQLi query and look atexecute()
or the /system/4.1.1/Events/Events.php and modify thetrigger()
function I only see what I expect (aka the correct number):
public static function trigger($eventName, ...$arguments): bool
{
// Read in our Config/Events file so that we have them all!
if (! static::$initialized)
{
static::initialize();
}
$listeners = static::listeners($eventName);
if ($eventName == 'DBQuery'){
foreach ($arguments as $obj){
print'<pre>';print_r($obj->getOriginalQuery());print'</pre>';
}
}
foreach ($listeners as $listener)
{
$start = microtime(true);
$result = static::$simulate === false ? call_user_func($listener, ...$arguments) : true;
if (CI_DEBUG)
{
static::$performanceLog[] = [
'start' => $start,
'end' => microtime(true),
'event' => strtolower($eventName),
];
}
if ($result === false)
{
return false;
}
}
return true;
}
Is the debug bar doing something else in the background that would explain why its reporting double? Or is it a bug?
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: call to a member function format() on string
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.