Deprecated: tep_get_system_information function has been deprecated

Open to all! Ask other shopowners for help.
Post Reply
gsmiley007
Member
Posts: 82
Joined: Sun Mar 14, 2021 9:28 pm
Phoenix Version:
Has thanked: 9 times
Been thanked: 2 times

Deprecated: tep_get_system_information function has been deprecated

Post 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


Join The Code Co-op to get access to your library in the Code Co-op Forum
Omar_one
Senior Contributor
Posts: 677
Joined: Fri Oct 25, 2019 5:06 pm
Phoenix Version: v1.0.8.16
Has thanked: 100 times
Been thanked: 56 times

Re: Deprecated: tep_get_system_information function has been deprecated

Post 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
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: Deprecated: tep_get_system_information function has been deprecated

Post 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()
gsmiley007
Member
Posts: 82
Joined: Sun Mar 14, 2021 9:28 pm
Phoenix Version:
Has thanked: 9 times
Been thanked: 2 times

Re: Deprecated: tep_get_system_information function has been deprecated

Post 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?
Omar_one
Senior Contributor
Posts: 677
Joined: Fri Oct 25, 2019 5:06 pm
Phoenix Version: v1.0.8.16
Has thanked: 100 times
Been thanked: 56 times

Re: Deprecated: tep_get_system_information function has been deprecated

Post 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


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply