cicool icon indicating copy to clipboard operation
cicool copied to clipboard

Upgrade from 3.1.8 to 3.19

Open jadolyo opened this issue 4 years ago • 4 comments

When I tried to upgrade from CI 3.1.8 to 3.19 I got this error

An uncaught Exception was encountered Type: Error

Message: Cannot access protected property CI_Form_validation::$CI

Filename: D:\xampp72\htdocs\erc\application\core\My_Controller.php

Line Number: 20

Backtrace:

File: D:\xampp72\htdocs\erc\application\core\My_Controller.php Line: 459 Function: __construct

File: D:\xampp72\htdocs\erc\modules\repair_tracking\controllers\backend\Repair_tracking.php Line: 17 Function: __construct

File: D:\xampp72\htdocs\erc\index.php Line: 339 Function: require_once

image

jadolyo avatar Nov 20 '20 20:11 jadolyo

I've put a comment on line 20 in the My_Controller.php file and the system works again.

Can you tell me what it does exactly that line!?

image

jadolyo avatar Nov 20 '20 20:11 jadolyo

I reverted back because of this error, Can you help with this issue?

jadolyo avatar Nov 20 '20 23:11 jadolyo

Hi what your PHP version ? and can you check on [image: image.png] [image: image.png] property is public ?

Thanks

On Fri, Nov 20, 2020 at 6:38 PM Ahmed Abdelrahim M. Jadelrab < [email protected]> wrote:

I reverted back because of this error, Can you help with this issue?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ridwanskaterock/cicool/issues/436#issuecomment-731461743, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACGXJLKE4MLSS3WY4AXMGK3SQ34X3ANCNFSM4T5HVM6A .

--

Muhamad Ridwan Software Engineer | Cicool Engine m: +62 812 1310 9812 e: [email protected] Bogor West Java - Indonesia www.go-moment.com http://go-moment.com [image: facebook icon] [image: twitter icon] [image: youtube icon] [image: linkedin icon]

ridwanskaterock avatar Nov 21 '20 03:11 ridwanskaterock

PHP v7.2.33

`<?php defined('BASEPATH') OR exit('No direct script access allowed');

require_once APPPATH . '/libraries/Jwt/BeforeValidException.php'; require_once APPPATH . '/libraries/Jwt/ExpiredException.php'; require_once APPPATH . '/libraries/Jwt/SignatureInvalidException.php'; require_once APPPATH . '/libraries/Jwt/JWT.php'; require_once APPPATH . '/libraries/REST_Controller.php';

use \Firebase\JWT\JWT;

class MY_Controller extends MX_Controller {

public $data = [];
public $response = [];

public function __construct()
{
    parent::__construct();
    $this->form_validation->CI =& $this;
    
    $this->config->set_item('language', 'english');
    $this->output->set_header("Cache-Control: no-store, no-cache, must-revalidate");
    $this->output->set_header("Cache-Control: private, no-store, max-age=0, no-cache, must-revalidate, post-check=0, pre-check=0");
    $this->output->set_header("Pragma: no-cache"); 
    $this->output->set_header("Access-Control-Allow-Origin: *"); 

    $this->load->helper(['cookie']);

    if ($lang = get_cookie('language')) {
        $this->lang->load([
            'web',
            'form_validation',
            'upload',
            'db',
        ], $lang);
    } else {
        $lang = get_lang_by_ip($this->input->ip_address());

        $this->lang->load([
            'web',
            'form_validation',
            'upload',
            'db',
        ], $lang);
        set_cookie('language', $lang, (60 * 60 * 24) * 365 );
    }
    $this->current_lang = $lang;
    if (installation_complete()) {
        date_default_timezone_set(get_option('timezone', 'asia/jakarta'));
        load_extensions();
        $this->load->library(['aauth', 'cc_html', 'cc_page_element', 'cc_app', 'cc_extension']);

        if (ENVIRONMENT != 'production') {
           if ($this->uri->segment(1) == 'api') {
                $this->output->enable_profiler(FALSE);
            } else {
                $this->output->enable_profiler(TRUE);
            }
        } 

    }
}`

jadolyo avatar Nov 21 '20 12:11 jadolyo