-
ikesela
Member
-
Posts: 155
Threads: 0
Joined: Nov 2020
Reputation:
7
01-03-2022, 06:19 PM
(This post was last modified: 01-03-2022, 06:42 PM by ikesela.)
got this error
Code: Access to undeclared static property Kint\Kint::$depth_limit
252 Kint::$depth_limit = $config->maxDepth;
i have to comment it out to make it work;
// Kint::$depth_limit = $config->maxDepth;
-
kenjis
Administrator
-
Posts: 3,671
Threads: 96
Joined: Oct 2014
Reputation:
230
01-03-2022, 06:49 PM
(This post was last modified: 01-03-2022, 07:45 PM by kenjis.)
Sorry, "codeigniter4/framework" has out of dated composer.json.
The workaround is to revert the following changes:
PHP Code: --- a/system/CodeIgniter.php +++ b/system/CodeIgniter.php @@ -249,7 +249,7 @@ class CodeIgniter */ $config = config('Config\Kint');
- Kint::$max_depth = $config->maxDepth; + Kint::$depth_limit = $config->maxDepth; Kint::$display_called_from = $config->displayCalledFrom; Kint::$expanded = $config->expanded;
@@ -261,7 +261,7 @@ class CodeIgniter RichRenderer::$folder = $config->richFolder; RichRenderer::$sort = $config->richSort; if (! empty($config->richObjectPlugins) && is_array($config->richObjectPlugins)) { - RichRenderer::$object_plugins = $config->richObjectPlugins; + RichRenderer::$value_plugins = $config->richObjectPlugins; } if (! empty($config->richTabPlugins) && is_array($config->richTabPlugins)) { RichRenderer::$tab_plugins = $config->richTabPlugins;
The error Access to undeclared static property Kint\Kint::$depth_limit was fixed.
v4.1.6 was re-released.
v4.1.6 has a security fix. Users of all versions prior to 4.1.6 are encouraged to update.
Deserialization of Untrusted Data in Codeigniter4 · Advisory · codeigniter4/CodeIgniter4
https://github.com/codeigniter4/CodeIgni...-wj64-mc9x
-
ikesela
Member
-
Posts: 155
Threads: 0
Joined: Nov 2020
Reputation:
7
-
kenjis
Administrator
-
Posts: 3,671
Threads: 96
Joined: Oct 2014
Reputation:
230
-
ferb
Junior Member
-
Posts: 14
Threads: 4
Joined: Dec 2020
Reputation:
0
I have this error with PHP 8.1.1
ErrorException
number_format(): Passing null to parameter #1 ($num) of type float is deprecated
I update with composer
-
ferb
Junior Member
-
Posts: 14
Threads: 4
Joined: Dec 2020
Reputation:
0
(01-03-2022, 09:18 PM)kenjis Wrote: Can you show us full stack trace? Yeap, this is
Code: {PHP internal code} — CodeIgniter\Debug\Exceptions->errorHandler ( arguments )
SYSTEMPATH/Database/BaseConnection.php : 933 — number_format()
SYSTEMPATH/Debug/Toolbar/Collectors/Database.php : 112 — CodeIgniter\Database\BaseConnection->getConnectDuration ()
105
106 foreach ($this->connections as $alias => $connection) {
107 // Connection Time
108 $data[] = [
109 'name' => 'Connecting to Database: "' . $alias . '"',
110 'component' => 'Database',
111 'start' => $connection->getConnectStart(),
112 'duration' => $connection->getConnectDuration(),
113 ];
114 }
115
116 foreach (static::$queries as $query) {
117 $data[] = [
118 'name' => 'Query',
119 'component' => 'Database',
SYSTEMPATH/Debug/Toolbar/Collectors/BaseCollector.php : 115 — CodeIgniter\Debug\Toolbar\Collectors\Database->formatTimelineData ()
108 */
109 public function timelineData(): array
110 {
111 if (! $this->hasTimeline) {
112 return [];
113 }
114
115 return $this->formatTimelineData();
116 }
117
118 /**
119 * Does this Collector have data that should be shown in the
120 * 'Vars' tab?
121 */
122 public function hasVarData(): bool
SYSTEMPATH/Debug/Toolbar/Collectors/BaseCollector.php : 231 — CodeIgniter\Debug\Toolbar\Collectors\BaseCollector->timelineData ()
224 'display' => $this->display(),
225 'badgeValue' => $this->getBadgeValue(),
226 'isEmpty' => $this->isEmpty(),
227 'hasTabContent' => $this->hasTabContent(),
228 'hasLabel' => $this->hasLabel(),
229 'icon' => $this->icon(),
230 'hasTimelineData' => $this->hasTimelineData(),
231 'timelineData' => $this->timelineData(),
232 ];
233 }
234 }
235
SYSTEMPATH/Debug/Toolbar.php : 90 — CodeIgniter\Debug\Toolbar\Collectors\BaseCollector->getAsArray ()
83 $data['totalMemory'] = number_format((memory_get_peak_usage()) / 1024 / 1024, 3);
84 $data['segmentDuration'] = $this->roundTo($data['totalTime'] / 7);
85 $data['segmentCount'] = (int) ceil($data['totalTime'] / $data['segmentDuration']);
86 $data['CI_VERSION'] = CodeIgniter::CI_VERSION;
87 $data['collectors'] = [];
88
89 foreach ($this->collectors as $collector) {
90 $data['collectors'][] = $collector->getAsArray();
91 }
92
93 foreach ($this->collectVarData() as $heading => $items) {
94 $varData = [];
95
96 if (is_array($items)) {
97 foreach ($items as $key => $value) {
SYSTEMPATH/Debug/Toolbar.php : 368 — CodeIgniter\Debug\Toolbar->run ( arguments )
361 if ($response instanceof DownloadResponse) {
362 return;
363 }
364
365 $toolbar = Services::toolbar(config(self::class));
366 $stats = $app->getPerformanceStats();
367 $data = $toolbar->run(
368 $stats['startTime'],
369 $stats['totalTime'],
370 $request,
371 $response
372 );
373
374 helper('filesystem');
375
SYSTEMPATH/Filters/DebugToolbar.php : 40 — CodeIgniter\Debug\Toolbar->prepare ( arguments )
33 * If the debug flag is set (CI_DEBUG) then collect performance
34 * and debug information and display it in a toolbar.
35 *
36 * @param array|null $arguments
37 */
38 public function after(RequestInterface $request, ResponseInterface $response, $arguments = null)
39 {
40 Services::toolbar()->prepare($request, $response);
41 }
42 }
43
SYSTEMPATH/Filters/Filters.php : 196 — CodeIgniter\Filters\DebugToolbar->after ( arguments )
189 continue;
190 }
191
192 return $result;
193 }
194
195 if ($position === 'after') {
196 $result = $class->after($this->request, $this->response, $this->argumentsClass[$className] ?? null);
197
198 if ($result instanceof ResponseInterface) {
199 $this->response = $result;
200
201 continue;
202 }
203 }
SYSTEMPATH/CodeIgniter.php : 429 — CodeIgniter\Filters\Filters->run ( arguments )
422
423 // Never run filters when running through Spark cli
424 if (! defined('SPARKED')) {
425 $filters->setResponse($this->response);
426
427 // Run "after" filters
428 $this->benchmark->start('after_filters');
429 $response = $filters->run($uri, 'after');
430 $this->benchmark->stop('after_filters');
431 } else {
432 $response = $this->response;
433
434 // Set response code for CLI command failures
435 if (is_numeric($returned) || $returned === false) {
436 $response->setStatusCode(400);
SYSTEMPATH/CodeIgniter.php : 320 — CodeIgniter\CodeIgniter->handleRequest ( arguments )
313 $this->response->pretend($this->useSafeOutput)->send();
314 $this->callExit(EXIT_SUCCESS);
315
316 return;
317 }
318
319 try {
320 return $this->handleRequest($routes, $cacheConfig, $returnResponse);
321 } catch (RedirectException $e) {
322 $logger = Services::logger();
323 $logger->info('REDIRECTED ROUTE at ' . $e->getMessage());
324
325 // If the route is a 'redirect' route, it throws
326 // the exception with the $to as the message
327 $this->response->redirect(base_url($e->getMessage()), 'auto', $e->getCode());
FCPATH/index.php : 46 — CodeIgniter\CodeIgniter->run ()
39 /*
40 *---------------------------------------------------------------
41 * LAUNCH THE APPLICATION
42 *---------------------------------------------------------------
43 * Now that everything is setup, it's time to actually fire
44 * up the engines and make this app do its thang.
45 */
46 $app->run();
47
-
kenjis
Administrator
-
Posts: 3,671
Threads: 96
Joined: Oct 2014
Reputation:
230
-
ferb
Junior Member
-
Posts: 14
Threads: 4
Joined: Dec 2020
Reputation:
0
|