Page 1 of 1

Deprecated: tep_get_system_information function has been deprecated

Posted: Mon Jul 05, 2021 4:18 am
by gsmiley007
Looking through the excel doc:

https://docs.google.com/spreadsheets/d/1R-
tBvdqGC0NrppEes7z2xQp6xe1zi3LMT46gZ2pUNpg/edit#gid=0

Didn't find any reference to tep_get_system_information.

Deprecated: The tep_get_system_information function has been deprecated. in
/admin/includes/functions/general.php on line 325

Re: Deprecated: tep_get_system_information function has been deprecated

Posted: Mon Jul 05, 2021 9:42 am
by Omar_one
I think it's has change to

Code: Select all

new system_info();
I am not sure . Hope some one will confirm that

Re: Deprecated: tep_get_system_information function has been deprecated

Posted: Mon Jul 05, 2021 10:33 am
by ecartz
The error message gives a file and line number. In this case /admin/includes/functions/general.php on line 325

Looking there, it says

Code: Select all

    trigger_error('The tep_get_system_information function has been deprecated.', E_USER_DEPRECATED);
    // use the system_information class directly
    return (new system_information())->get_data();
So the equivalent without the notification would be to replace

Code: Select all

tep_get_system_information()
with

Code: Select all

(new system_information())->get_data()

Re: Deprecated: tep_get_system_information function has been deprecated

Posted: Mon Jul 05, 2021 2:33 pm
by gsmiley007
Thanks, i change the code:

// $system = tep_get_system_information();
$system = (new system_information())->get_data();

But got this message:

Fatal error: Uncaught Error: Class 'system_information' not found in admin/includes/functions/easypopulate_functions.php:63 Stack trace: #0 admin/easypopulate.php(21): GetSystemDetails() #1 {main} thrown in admin/includes/functions/easypopulate_functions.php on line 63

Do i need some kind of include statement for the system_information function?

Re: Deprecated: tep_get_system_information function has been deprecated

Posted: Mon Jul 05, 2021 6:07 pm
by Omar_one
@gsmiley007 I get it working by change line 62 in

Code: Select all

$system = tep_get_system_information();
to

Code: Select all

 $system = (new system_info())->get_data();
and you will get another error

Code: Select all

Notice: Undefined index: oscommerce in \admin\easypopulate.php on line 1464
you can just delete these lines 1463-1464

Code: Select all

      <?php        
             if (defined('PROJECT_VERSION')) { echo PROJECT_VERSION . ' ' . $system['oscommerce']['version'] . '<br>'; } ?>
After these change I can export and import an easy populate file.. I am not sure if there is more error ...

@admin maybe this topic can move it to original topic viewtopic.php?f=10&t=700