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:
@@ -28,7 +28,7 @@ class Modfases extends MY_Model{
|
||||
ORDER BY volgorde";
|
||||
$res = $this->get_query_result();
|
||||
$onb = (object) array("naam"=>"onbekend", "kleur"=>"#989898");
|
||||
array_unshift($res,$onb );
|
||||
if (is_array($res)) array_unshift($res,$onb );
|
||||
return $res;
|
||||
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ class ModPartActKosten extends MY_Model{
|
||||
FROM tbPartActKosten
|
||||
WHERE id = $kostID" ;
|
||||
$results = $this->get_query_row();
|
||||
if (! $results) $results = new stdClass();
|
||||
$results->kosten = mysql2bedrag($results->kosten);
|
||||
return $results;
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ class Mutatielog_model extends MY_Model{
|
||||
function store_mutatie($mutatie){
|
||||
$sql = "
|
||||
INSERT INTO replicatie.replicatielog (replicatie_data, creation_date, created_by, last_update_date, last_updated_by)
|
||||
VALUES('".mysql_real_escape_string(serialize($mutatie))."', NOW(), 'cron', NOW(), 'cron')";
|
||||
VALUES('".$this->db->escape_str(serialize($mutatie))."', NOW(), 'cron', NOW(), 'cron')";
|
||||
$this->db->query($sql);
|
||||
}
|
||||
|
||||
|
||||
@@ -132,14 +132,14 @@ class Phantom_model extends CI_Model{
|
||||
if(!$margins){
|
||||
return $this->margins;
|
||||
}elseif(!is_array($margins)){
|
||||
$margins = str_replace('cm', $margins);
|
||||
$margins = str_replace('cm', '', $margins);
|
||||
|
||||
if(!is_numeric($margins)) return $this->margins;
|
||||
|
||||
return array($margins.'cm',$margins.'cm',$margins.'cm',$margins.'cm');
|
||||
}elseif(count($margins)==2){
|
||||
$margin1 = str_replace('cm', $margins[0]);
|
||||
$margin2 = str_replace('cm', $margins[1]);
|
||||
$margin1 = str_replace('cm', '', $margins[0]);
|
||||
$margin2 = str_replace('cm', '', $margins[1]);
|
||||
|
||||
if(!is_numeric($margin1) && !is_numeric($margins2)) return $this->margins;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user