CodeIgniter 3.1.11 -> 3.4.5 (pocketarc fork) en PHP 8.3-fixes

- system/ vervangen door CodeIgniter 3.4.5 (pocketarc/codeigniter, PHP 8.2-8.5 compatibel)
- config.php, mimes.php, user_agents.php en error-views bijgewerkt naar 3.4.5
- composer.json: php-constraint "^7.4 || ^8.0" zodat composer install op 8.3 werkt
- PHP 8-fatals opgelost: count()/array-functies op FALSE/null, rekenen met lege
  strings, delen door nul, property zetten op FALSE, curly-brace string offsets,
  ongedefinieerde constanten, foute curl_setopt in Phantom_model::create_img
- dynamic properties gedeclareerd in libraries, optionele parameters voor verplichte opgelost
- vergelijkingen waar '' == 0 in PHP 8 anders uitvalt gecast naar (int)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-22 09:34:46 +02:00
co-authored by Claude Opus 5.5
parent c6afbb01f2
commit 172fcf566c
284 changed files with 3497 additions and 3718 deletions
+84 -13
View File
@@ -6,7 +6,7 @@
*
* This content is released under the MIT License (MIT)
*
* Copyright (c) 2014 - 2019, British Columbia Institute of Technology
* Copyright (c) 2019 - 2022, CodeIgniter Foundation
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -30,6 +30,7 @@
* @author EllisLab Dev Team
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
* @copyright Copyright (c) 2014 - 2019, British Columbia Institute of Technology (https://bcit.ca/)
* @copyright Copyright (c) 2019 - 2022, CodeIgniter Foundation (https://codeigniter.com/)
* @license https://opensource.org/licenses/MIT MIT License
* @link https://codeigniter.com
* @since Version 1.0.0
@@ -50,7 +51,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @subpackage Libraries
* @category Libraries
* @author EllisLab Dev Team
* @link https://codeigniter.com/user_guide/general/profiling.html
* @link https://codeigniter.com/userguide3/general/profiling.html
*/
class CI_Profiler {
@@ -72,6 +73,76 @@ class CI_Profiler {
'config'
);
/**
* Compile benchmarks
*
* @var bool
*/
protected $_compile_benchmarks;
/**
* Compile GET data
*
* @var bool
*/
protected $_compile_get;
/**
* Compile memory usage
*
* @var bool
*/
protected $_compile_memory_usage;
/**
* Compile POST data
*
* @var bool
*/
protected $_compile_post;
/**
* Compile URI string
*
* @var bool
*/
protected $_compile_uri_string;
/**
* Compile controller info
*
* @var bool
*/
protected $_compile_controller_info;
/**
* Compile queries
*
* @var bool
*/
protected $_compile_queries;
/**
* Compile HTTP headers
*
* @var bool
*/
protected $_compile_http_headers;
/**
* Compile session data
*
* @var bool
*/
protected $_compile_session_data;
/**
* Compile config data
*
* @var bool
*/
protected $_compile_config;
/**
* Number of queries to show before making the additional queries togglable
*
@@ -105,7 +176,7 @@ class CI_Profiler {
{
if ( ! isset($config[$section]))
{
$this->_compile_{$section} = TRUE;
$this->{'_compile_'.$section} = TRUE;
}
}
@@ -135,7 +206,7 @@ class CI_Profiler {
{
if (in_array($method, $this->_available_sections))
{
$this->_compile_{$method} = ($enable !== FALSE);
$this->{'_compile_'.$method} = ($enable !== FALSE);
}
}
}
@@ -486,17 +557,17 @@ class CI_Profiler {
{
$pre = '';
$pre_close = '';
if (is_array($val) OR is_object($val))
{
$val = print_r($val, TRUE);
$pre = '<pre>' ;
$pre_close = '</pre>';
$pre_close = '</pre>';
}
$output .= '<tr><td style="padding:5px;vertical-align:top;color:#900;background-color:#ddd;">'
.$config.'&nbsp;&nbsp;</td><td style="padding:5px;color:#000;background-color:#ddd;">'.$pre.htmlspecialchars($val, ENT_QUOTES, config_item('charset')).$pre_close."</td></tr>\n";
.$config.'&nbsp;&nbsp;</td><td style="padding:5px;color:#000;background-color:#ddd;">'.$pre.htmlspecialchars((string) $val, ENT_QUOTES, config_item('charset')).$pre_close."</td></tr>\n";
}
return $output."</table>\n</fieldset>";
@@ -524,17 +595,17 @@ class CI_Profiler {
{
$pre = '';
$pre_close = '';
if (is_array($val) OR is_object($val))
{
$val = print_r($val, TRUE);
$pre = '<pre>' ;
$pre_close = '</pre>';
$pre_close = '</pre>';
}
$output .= '<tr><td style="padding:5px;vertical-align:top;color:#900;background-color:#ddd;">'
.$key.'&nbsp;&nbsp;</td><td style="padding:5px;color:#000;background-color:#ddd;">'.$pre.htmlspecialchars($val, ENT_QUOTES, config_item('charset')).$pre_close."</td></tr>\n";
.$key.'&nbsp;&nbsp;</td><td style="padding:5px;color:#000;background-color:#ddd;">'.$pre.htmlspecialchars((string) $val, ENT_QUOTES, config_item('charset')).$pre_close."</td></tr>\n";
}
return $output."</table>\n</fieldset>";
@@ -554,7 +625,7 @@ class CI_Profiler {
foreach ($this->_available_sections as $section)
{
if ($this->_compile_{$section} !== FALSE)
if ($this->{'_compile_'.$section} !== FALSE)
{
$func = '_compile_'.$section;
$output .= $this->{$func}();