diff --git a/application/controllers/monpas/Berichten.php b/application/controllers/monpas/Berichten.php index 231d99d..1d77a6e 100644 --- a/application/controllers/monpas/Berichten.php +++ b/application/controllers/monpas/Berichten.php @@ -124,7 +124,7 @@ class Berichten extends MY_Controller { foreach ( $berichten ? $berichten : [] as $bericht ) { $bericht->datum = mysql2date( $bericht->startdatum ); - $bericht->inhoud = nl2br( base64_decode( $bericht->inhoud ) ); + $bericht->inhoud = nl2br( base64_decode( $bericht->inhoud ?? '' ) ); } return $berichten; } @@ -239,9 +239,9 @@ class Berichten extends MY_Controller { return; } $berichtID = $this->uri->segment( 4 ); - $datum = str_replace( '/', '-', $this->input->post( 'datum' )); - $samenvatting = $this->input->post( 'samenvatting' ); - $inhoud = $this->input->post( 'inhoud' ); + $datum = str_replace( '/', '-', $this->input->post( 'datum' ) ?? ''); + $samenvatting = $this->input->post( 'samenvatting' ) ?? ''; + $inhoud = $this->input->post( 'inhoud' ) ?? ''; $samenvatting = stripslashes( implode( "", explode( "\\", $samenvatting ))); if (! $samenvatting || ! strlen( $samenvatting )> 3){ $this->deletebericht($berichtID);