Welcome Guest, Not a member yet? Register   Sign In
undefined model method does not rise error
#6

(This post was last modified: 03-10-2020, 08:55 PM by John_Betong.)

@carlorfeo,

I think this is is a major BUG and dread to think of the other repercussions!!!

> Is there a config parameter to control it?

Code:
# file: system/config/Services.php

public static function exceptions
(
  \Config\Exceptions $config = null,
  IncomingRequest $request = null,
  Response $response = null,
  bool $getShared = true
)
{
# John - KLUDGE UNTIL A FIX IS AVAILABLE        
# if(CI_DEBUG):    
#  OR     
if( 'development'===CI_ENVIRONMENT ):
  # USE STANDARD PHP ERRORS
else:
  if ($getShared)
  {
    return static::getSharedInstance('exceptions', $config, $request, $response);
  }

  if (empty($config))
  {
    $config = new \Config\Exceptions();
  }

  if (empty($request))
  {
    $request = static::request();
  }

  if (empty($response))
  {
    $response = static::response();
  }

  return (new Exceptions($config, $request, $response));
endif; # John - KLUDGE UNTIL A FIX IS AVAILABLE        
}

Output:
Quote:Fatal error: Uncaught Error: Call to a member function initialize() on null in /var/www/ci4-strict.tk/system/CodeIgniter.php:190
Stack trace:
#0 /var/www/ci4-strict.tk/system/bootstrap.php(169): CodeIgniter\CodeIgniter->initialize()
#1 /var/www/ci4-strict.tk/public_html/index.php(78): require('/var/www/ci4-st...')
#2 {main}
thrown in /var/www/ci4-strict.tk/system/CodeIgniter.php on line 190
Reply


Messages In This Thread
RE: undefined model method does not rise error - by John_Betong - 03-10-2020, 08:45 PM



Theme © iAndrew 2016 - Forum software by © MyBB