Skip to content

Commit

Permalink
Merge pull request #5708 from samsonasik/make-context-nullable
Browse files Browse the repository at this point in the history
Make CodeIgniter::context nullable to handle access before initialization
  • Loading branch information
samsonasik authored Feb 19, 2022
2 parents bc96617 + e6af132 commit eb09acd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion system/CodeIgniter.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class CodeIgniter
*
* @phpstan-var 'php-cli'|'spark'|'web'
*/
protected string $context;
protected ?string $context = null;

/**
* Constructor.
Expand Down
2 changes: 1 addition & 1 deletion system/Test/Mock/MockCodeIgniter.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

class MockCodeIgniter extends CodeIgniter
{
protected string $context = 'web';
protected ?string $context = 'web';

protected function callExit($code)
{
Expand Down

0 comments on commit eb09acd

Please sign in to comment.