CodeIgniter Forums
Type hint issue - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forum-28.html)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forum-30.html)
+--- Thread: Type hint issue (/thread-72047.html)



Type hint issue - scalla - 10-29-2018

i run codeigniter4 on php 7.1, yet i get this warning "Default value for parameters with a class type hint can only be NULL in /home/redEye/system/Common.php on line 98" when running cron job.
the stated line is the config function.


RE: Type hint issue - ciadmin - 10-29-2018

Are you sure you are running PHP7+? There was an earlier thread on our forum (https://forum.codeigniter.com/thread-69544.html) and several on stackoverflow ... they all seemed to boil down to installing PHP 7.1", possibly with a composer update when done.


RE: Type hint issue - scalla - 10-29-2018

@ciadmin my local server runs properly on 7.2 my live server runs 7.1.


RE: Type hint issue - ciadmin - 10-29-2018

Hmm. Something somewhere doesn't think so Sad
Is your cron script run with php 7 too?
I am not sure what else to suggest.


RE: Type hint issue - scalla - 10-30-2018

@ciadmin all on same server. sat on it all night, with no drop of clue