-1

I hope you are all fine. Recently, my host has upgraded the PHP version to PHP 5.4. I cannot use my web application "myclientbase" any longer. Some features like auto suggestion are no longer available. Is there any way to keep the old version of PHP 5.3? I didn't face any issues while using this version.

Please check the below errors;

A PHP Error was encountered
Severity: Warning
Message: Creating default object from empty value
Filename: models/mdl_mcb_data.php
Line Number: 88

A PHP Error was encountered

Severity: Warning
Message: Creating default object from empty value
Filename: models/mdl_mcb_userdata.php
Line Number: 76

Thank you very much for your help.

Jonan
  • 2,485
  • 3
  • 24
  • 42
  • 1
    If your question really is how to change the php version, then this is the wrong place to ask. But anyway, instead you should solve the problem instead of trying to stay in the past. – arkascha Jul 18 '14 at 15:52
  • it would help if you would show the lines of code which are throwing the error.. We might be nice enough to give you pointers on where to look – Daryl Gill Jul 18 '14 at 15:54

3 Answers3

3

1) Open

/application/modules_core/mcb_data/models/mdl_mcb_data.php

/application/modules_core/mcb_data/models/mdl_mcb_userdata.php

/application/modules_core/mcb_data/models/mdl_mcb_client_data.php

2) after public $settings line 5 insert

public function __construct() {
if(empty($this->settings))$this->settings= new stdClass();
}
offmose
  • 31
  • 3
  • It works fine to me in 5.6 but to avoid notifications move it to production in the index file: define('ENVIRONMENT', 'production') – open-ecommerce.org Oct 12 '16 at 12:18
  • Also see http://stackoverflow.com/questions/28348879/only-variable-references-should-be-returned-by-reference-codeigniter – gmo Nov 19 '16 at 18:45
0

1) Open /application/modules_core/mcb_data/models/mdl_mcb_data.php

2) Go to line 77

3) Change

foreach ($mcb_data as $data) {
    $this->settings->{$data->mcb_key} = $data->mcb_value;
}

to

$this->settings=new stdClass();
foreach ($mcb_data as $data) {
    $this->settings->{$data->mcb_key} = $data->mcb_value;
}
offmose
  • 31
  • 3
-2
  1. go to root folder

  2. open index.php

  3. change error_reporting(E_ALL); at line 34 to error_reporting(0);

  • 3
    Or better, replace the define('ENVIRONMENT', 'development'); (line 21) to define('ENVIRONMENT', 'production'); – clement Aug 19 '14 at 14:32