You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Info
I have been trying for over a week to trace a new site's "Network connection Error" from going down overnight. No errors in logs so added "strict_types=1" to all PHP app and system PHP files, also set .env -> CI_ENVIRONMENT = development and eventually managed to get some errors reported.
if ($this->config->maxHistory !== 0)
{
$history = new History();
# PROBLEM - 2021-03-06 - FORCE (int)
# CRITICAL - 2021-03-07 04:29:00 --> Argument 1 passed to
# CodeIgniter\Debug\Toolbar\Collectors\History::setFiles()
# must be of the type int, string given,
# called in /var/www/ci4-strict.tk/system/Debug/Toolbar.php on line 442
$history->setFiles(
(int) Services::request()->getGet('debugbar_time'),
$this->config->maxHistory
);
$data['collectors'][] = $history->getAsArray();
}
[/code]
Expected behavior, and steps to reproduce if appropriate
did not expect web page to crash
Context
OS: [Ubuntu 20.04.1]
Web server [Apache 2]
PHP version [8.0.3]
The text was updated successfully, but these errors were encountered:
John-Betong
added
the
bug
Verified issues on the current code behavior or pull requests that will fix them
label
Mar 11, 2021
This is a problem with using strict types, something the framework does not guarantee. If you would like to submit a PR I will review it but I don't consider this one a "bug".
MGatner
changed the title
Bug:
Bug: Toolbar::setFiles() requires int
Mar 11, 2021
paulbalandan
removed
the
bug
Verified issues on the current code behavior or pull requests that will fix them
label
Mar 12, 2021
paulbalandan
changed the title
Bug: Toolbar::setFiles() requires int
Toolbar::setFiles() requires int [strict_types=1]
Mar 12, 2021
Info
I have been trying for over a week to trace a new site's "Network connection Error" from going down overnight. No errors in logs so added "strict_types=1" to all PHP app and system PHP files, also set .env -> CI_ENVIRONMENT = development and eventually managed to get some errors reported.
Describe the bug
Incorrect type being passed to
CodeIgniter 4 version
CI_VERSION - 4.1.1
Affected module(s)
file: ./system/Debug/Toolbar.php
[code]
protected function format(string $data, string $format = 'html'): string
{
$data = json_decode($data, true);
[/code]
Expected behavior, and steps to reproduce if appropriate
did not expect web page to crash
Context
The text was updated successfully, but these errors were encountered: