I am using smarty template inside my php project its working fine on php 7.4 but not working on php 8

you can see there are many missing values in php 8 or 8.1.
how can i run this on php 8 shoud i upgrade smarty or is there some other issue with the code.
I updated the smarty library in the code but it did’nt worked at all moreover it started giving error.

Smarty Object returns this in 7.4:

TshSmarty Object
(
    [RootDir] => /home2/mjollnir/public_html/dev_mjollnirgroup/
    [TemplateDir] => /home2/mjollnir/public_html/dev_mjollnirgroup/template/
    [CompileDir] => /home2/mjollnir/public_html/dev_mjollnirgroup/compile/
    [CacheDir] => /home2/mjollnir/public_html/dev_mjollnirgroup/compile/cache/
    [IsCached] => 
    [IsCompileCheck] => 1
    [IsForceCompile] => 
    [template_dir] => /home2/mjollnir/public_html/dev_mjollnirgroup/template/
    [compile_dir] => /home2/mjollnir/public_html/dev_mjollnirgroup/compile/
    [config_dir] => configs
    [plugins_dir] => Array
        (
            [0] => plugins
        )

    [debugging] => 
    [error_reporting] => 
    [debug_tpl] => 
    [debugging_ctrl] => NONE
    [compile_check] => 1
    [force_compile] => 
    [caching] => 
    [cache_dir] => /home2/mjollnir/public_html/dev_mjollnirgroup/compile/cache/
    [cache_lifetime] => 3600
    [cache_modified_check] => 
    [php_handling] => 0
    [security] => 
  
)



and returns in PHP 8:


TshSmarty Object
(
    [template_dir] => templates
    [compile_dir] => templates_c
    [config_dir] => configs
    [plugins_dir] => Array
        (
            [0] => plugins
        )

    [_cache_include] => 
    [_cache_including] => 
    [RootDir] => 
    [TemplateDir] => 
    [CompileDir] => 
    [CacheDir] => 
    [IsCached] => 
    [IsCompileCheck] => 1
    [IsForceCompile] => 
)