[Notice] iconv(): Detected an illegal character in input string

GET /referencer/pdf?id=624

Line 333 in /srv/users/allremove/apps/allremove-silverstripe-4-7-2/public/app/code/Pages/ReferencePage.php

Source

324     public function slugify ($string) {
325         $string = strtolower($string);
326         $string = str_replace('æ','ae', $string);
327         $string = str_replace('ø','oe', $string);
328         $string = str_replace('å','aa', $string);
329         $string = str_replace('Æ','Ae', $string);
330         $string = str_replace('Ø','Oe', $string);
331         $string = str_replace('Å','Aa', $string);
332         $string = utf8_encode($string);
333         $string = iconv('UTF-8', 'ASCII//TRANSLIT', $string);   
334         $string = preg_replace('/[^a-z0-9- ]/i', '', $string);
335         $string = str_replace(' ', '-', $string);
336         $string = trim($string, '-');
337         $string = strtolower($string);
338 
339         if (empty($string)) {

Trace

GET /referencer/pdf?id=624

[Warning] Cannot modify header information - headers already sent by (output started at /srv/users/allremove/apps/allremove-silverstripe-4-7-2/public/vendor/silverstripe/framework/src/Control/HTTPResponse.php:427)

GET /referencer/pdf?id=624

Line 7657 in /srv/users/allremove/apps/allremove-silverstripe-4-7-2/public/vendor/tecnickcom/tcpdf/tcpdf.php

Source

7648 		}
7649 		switch($dest) {
7650 			case 'I': {
7651 				// Send PDF to the standard output
7652 				if (ob_get_contents()) {
7653 					$this->Error('Some data has already been output, can\'t send PDF file');
7654 				}
7655 				if (php_sapi_name() != 'cli') {
7656 					// send output to a browser
7657 					header('Content-Type: application/pdf');
7658 					if (headers_sent()) {
7659 						$this->Error('Some data has already been output to browser, can\'t send PDF file');
7660 					}
7661 					header('Cache-Control: private, must-revalidate, post-check=0, pre-check=0, max-age=1');
7662 					//header('Cache-Control: public, must-revalidate, max-age=0'); // HTTP/1.1
7663 					header('Pragma: public');

Trace

TCPDF ERROR: Some data has already been output to browser, can't send PDF file