session fix
This commit is contained in:
@@ -41,7 +41,7 @@ abstract class BaseController extends Controller
|
||||
* Be sure to declare properties for any property fetch you initialized.
|
||||
* The creation of dynamic property is deprecated in PHP 8.2.
|
||||
*/
|
||||
// protected $session;
|
||||
protected $session;
|
||||
|
||||
/**
|
||||
* @return void
|
||||
@@ -54,12 +54,14 @@ abstract class BaseController extends Controller
|
||||
// Preload any models, libraries, etc, here.
|
||||
|
||||
// E.g.: $this->session = \Config\Services::session();
|
||||
$this->session = \Config\Services::session();
|
||||
$httpHost = $_SERVER['HTTP_HOST'];
|
||||
|
||||
if ( $httpHost == 'https://promo.wrenchboard.com' || $httpHost == 'promo.wrenchboard.com' ){
|
||||
$_SERVER['CI_ENV'] = 'production';
|
||||
$_SERVER['CI_ENVIRONMENT'] = 'production';
|
||||
}
|
||||
// if ( session_status() !== PHP_SESSION_ACTIVE ) session_start();
|
||||
}
|
||||
|
||||
public function APIcall($method, $url, $data) {
|
||||
|
||||
Reference in New Issue
Block a user