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:
@@ -216,6 +216,7 @@ class Reports extends MY_Controller {
|
||||
$post = $this->input->get('data');
|
||||
$post = json_decode($this->input->get('data'));
|
||||
if ($init==1) {
|
||||
if ($post === null) $post = new stdClass;
|
||||
$post->orgid = $this->globorgid;
|
||||
$post = json_encode($post);
|
||||
$titel =array("titeltekst" => "Mensen/activiteiten");
|
||||
@@ -224,6 +225,7 @@ class Reports extends MY_Controller {
|
||||
else {
|
||||
$criteria=json_decode($this->input->get("data")) ;
|
||||
if (!$pdf){
|
||||
if ($criteria === null) $criteria = new stdClass;
|
||||
$criteria->orgid = $this->globorgid;
|
||||
};
|
||||
// hier dan de database activiteiten die nodig zijn voor het report
|
||||
@@ -398,6 +400,7 @@ class Reports extends MY_Controller {
|
||||
$i = 0;
|
||||
foreach($criteria->BGs as $BGid) {
|
||||
$orgs[$i]= $this->Organisaties_model->get_BG_by_id($BGid);
|
||||
if (! $orgs[$i]) $orgs[$i] = new stdClass();
|
||||
$orgs[$i]->organisaties = $this->Organisaties_model->get_orgs_per_bg($BGid);
|
||||
$i = $i + 1;
|
||||
};
|
||||
@@ -671,7 +674,7 @@ class Reports extends MY_Controller {
|
||||
$beelden=$this->Niveaus_model->get_niveaus();
|
||||
$beelden2=array();
|
||||
foreach($beelden as $beeld){
|
||||
if (in_array($beeld->id, $criteria->beelden) ) {
|
||||
if (is_array($criteria->beelden) && in_array($beeld->id, $criteria->beelden) ) {
|
||||
array_push($beelden2 , $beeld);
|
||||
$profielen[] = $this->Nivoprofielen_model->get_profielen_profiel($beeld->id);
|
||||
};
|
||||
@@ -682,7 +685,7 @@ class Reports extends MY_Controller {
|
||||
$pijlers[$i]= new stdClass;
|
||||
$pijlers[$i]->naam = $voorbeeld->naam;
|
||||
$pijlers[$i]->score=array();
|
||||
for ($j=0; $j < count($criteria->beelden );$j++ ){
|
||||
for ($j=0; $j < count((array)$criteria->beelden );$j++ ){
|
||||
$pijlers[$i]->score[$j]=$profielen[$j][$i]->waarde;
|
||||
};
|
||||
$i= $i+1;
|
||||
@@ -691,7 +694,7 @@ class Reports extends MY_Controller {
|
||||
foreach($criteria->beelden as $beeld){
|
||||
array_push($descriptions , $this->Niveaus_model->get_niveau($beeld));
|
||||
};
|
||||
$data = array( 'aantal' =>count($criteria->beelden) ,
|
||||
$data = array( 'aantal' =>count((array)$criteria->beelden) ,
|
||||
'beelden' =>$beelden2,
|
||||
'pijlers' =>$pijlers,
|
||||
'descriptions' =>$descriptions,
|
||||
@@ -714,6 +717,7 @@ class Reports extends MY_Controller {
|
||||
$post = json_decode($this->input->get('data'));
|
||||
|
||||
if ($init==1) {
|
||||
if ($post === null) $post = new stdClass;
|
||||
$post->orgid = $this->globorgid;
|
||||
$post = json_encode($post);
|
||||
$titel =array("titeltekst" => "Eigen schoolbeeld");
|
||||
@@ -722,6 +726,7 @@ class Reports extends MY_Controller {
|
||||
else {
|
||||
$criteria=json_decode($this->input->get("data")) ;
|
||||
if (!$pdf){
|
||||
if ($criteria === null) $criteria = new stdClass;
|
||||
$criteria->orgid = $this->globorgid;
|
||||
};
|
||||
$orgnaam=$this->Organisaties_model->get_record_by_id($criteria->orgid,"naam");
|
||||
@@ -948,7 +953,7 @@ private function GetMax($code){
|
||||
$i = $i + 1;
|
||||
$j = 0;
|
||||
};
|
||||
$aantal = count( $scholen);
|
||||
$aantal = isset($scholen) ? count( $scholen) : 0;
|
||||
|
||||
if ($aantal >= 1) {
|
||||
$k=0;
|
||||
@@ -964,10 +969,10 @@ private function GetMax($code){
|
||||
};
|
||||
};
|
||||
|
||||
$grandGem = round($grandGem / ($k * $aantal),0);
|
||||
$grandGem = round(($k * $aantal) != 0 ? $grandGem / ($k * $aantal) : 0,0);
|
||||
$grandSchoolbeeld = $this->GetBeeldGem($grandGem );
|
||||
|
||||
$grandProf = round($grandProf / (7 * $aantal), 0);
|
||||
$grandProf = round($aantal != 0 ? $grandProf / (7 * $aantal) : 0, 0);
|
||||
$SBcolor = $this->GetColorBijBeeld($grandSchoolbeeld);
|
||||
|
||||
$data = array( 'pijlers' =>$pijlers,
|
||||
@@ -995,6 +1000,7 @@ private function GetMax($code){
|
||||
$init = $this->uri->segment(5);
|
||||
$post = json_decode($this->input->get('data'));
|
||||
if ($init==1) {
|
||||
if ($post === null) $post = new stdClass;
|
||||
$post->role = $this->userrole;
|
||||
$post->userid = $this->userid;
|
||||
$post->orgid = $this->globorgid;
|
||||
@@ -1006,6 +1012,7 @@ private function GetMax($code){
|
||||
else {
|
||||
$criteria=json_decode($this->input->get("data")) ;
|
||||
if (!$pdf){
|
||||
if ($criteria === null) $criteria = new stdClass;
|
||||
$criteria->userlevel = $this->userrole;
|
||||
$criteria->userid = $this->userid;
|
||||
$criteria->orgid = $this->globorgid;
|
||||
|
||||
Reference in New Issue
Block a user