![]() |
Lost Session Data During File Validation - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: Lost Session Data During File Validation (/showthread.php?tid=87977) |
Lost Session Data During File Validation - putrapr - 07-01-2023 Hi! i'm using CI 4.3.6, there was a problem regarding file validation. View (/komik/create) Code: <?= $this->extend('layout/template'); ?> Controller (Komik), the relevant part PHP Code: <?php Routes, the relevant part Code: $routes->get('/komik/create', 'Komik::create'); If without file validation : Code: 'sampul' => 'uploaded[sampul]' application runs smoothly (only text validation), I get the desired error message. When I add file input validation, all session lost. I check session()->validation Error sentence: Fatal error: Uncaught Exception: Serialization of 'CodeIgniter\HTTP\Files\UploadedFile' is not allowed in [no active file]:0 Stack trace: #0 [internal function]: session_write_close() #1 {main} thrown in [no active file] on line 0 Can anyone help? Thank you |