CodeIgniter Forums
CI Upgrade - A non well formed numeric value encountered - 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: CI Upgrade - A non well formed numeric value encountered (/showthread.php?tid=80151)



CI Upgrade - A non well formed numeric value encountered - donpwinston - 09-20-2021

I just upgraded CI from 4.0.3 to 4.1.4,

I get an error setting the expiration of my session after a CI upgrade:
Code:
A non well formed numeric value encountered search →
SYSTEMPATH/Session/Session.php at line 189

          $this->cookie = new Cookie($this->sessionCookieName, '', [
189             'expires'  => $this->sessionExpiration === 0 ? 0 : time() + $this->sessionExpiration,

It thinks sessionExpiration is a string and barfs converting it? In my .env file I've got:
app.sessionExpiration = 259200;

PHP shouldn't have any problem with this.


RE: CI Upgrade - A non well formed numeric value encountered - paulbalandan - 09-20-2021

Remove the semicolon after 259200


RE: CI Upgrade - A non well formed numeric value encountered - donpwinston - 09-20-2021

Duh! Thanks! I wonder why it worked before.