PHP Fatal Error: Uncaught TypeError encountered

Running the latest version of Pro on PHP 8.4.

 PHP Fatal error:  Uncaught TypeError: array_map(): Argument #2 ($array) must be of type array, null given in /var/web/site/public_html/wp-content/themes/pro/cornerstone/includes/functions/api.php:174
    Stack trace:
    #0 /var/web/site/public_html/wp-content/themes/pro/cornerstone/includes/functions/api.php(174): array_map(Object(Closure), NULL)
    #1 /var/web/site/public_html/wp-content/themes/pro/cornerstone/includes/classes/Controllers/Choices.php(53): cs_dynamic_options_get('globalfont', Array)
    #2 [internal function]: Themeco\Cornerstone\Controllers\Choices->get_dynamic_options(Array)
    #3 /var/web/site/public_html/wp-content/themes/pro/cornerstone/includes/classes/Services/Routes.php(149): call_user_func_array(Array, Array)
    #4 /var/web/site/public_html/wp-includes/class-wp-hook.php(341): Themeco\Cornerstone\Services\Routes->{closure:Themeco\Cornerstone\Services\Routes::add_route():148}(NULL, Array)
    #5 /var/web/site/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters(NULL, Array)
    #6 /var/web/site/public_html/wp-content/themes/pro/cornerstone/includes/classes/Services/Routes.php(101): apply_filters('tco_routing_get...', NULL, Array)
    #7 /var/web/site/public_html/wp-includes/rest-api/class-wp-rest-server.php(1292): Themeco\Cornerstone\Services\Routes->rest_endpoint(Object(WP_REST_Request))
    #8 /var/web/site/public_html/wp-includes/rest-api/class-wp-rest-server.php(1125): WP_REST_Server->respond_to_request(Object(WP_REST_Request), '/themeco/data/(...', Array, NULL)
    #9 /var/web/site/public_html/wp-includes/rest-api/class-wp-rest-server.php(439): WP_REST_Server->dispatch(Object(WP_REST_Request))
    #10 /var/web/site/public_html/wp-includes/rest-api.php(467): WP_REST_Server->serve_request('/themeco/data/d...')
    #11 /var/web/site/public_html/wp-includes/class-wp-hook.php(341): rest_api_loaded(Object(WP))
    #12 /var/web/site/public_html/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters('', Array)
    #13 /var/web/site/public_html/wp-includes/plugin.php(570): WP_Hook->do_action(Array)
    #14 /var/web/site/public_html/wp-includes/class-wp.php(418): do_action_ref_array('parse_request', Array)
    #15 /var/web/site/public_html/wp-includes/class-wp.php(821): WP->parse_request('')
    #16 /var/web/site/public_html/wp-includes/functions.php(1343): WP->main('')
    #17 /var/web/site/public_html/wp-blog-header.php(16): wp()
    #18 /var/web/site/public_html/index.php(17): require('/var/web/site/p...')
    #19 {main}
      thrown in /var/web/site/public_html/wp-content/themes/pro/cornerstone/includes/functions/api.php on line 174

Hello @JvP

Thanks for writing to us.

I have checked on my end on the PHP 8.4 version, and it is working fine. I have tested with Pro 6.7.11, WordPress 6.9, and PHP version 8.4.15. Please add the code to your wp-config.php file for debugging setup, and log the error into the file named debug.log inside the wp-content folder.
You can let us know if you find any errors that are related to our theme or theme-bundled plugins. We can do further investigation based on that.

// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );

// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );

// Disable display of errors and warnings 
define( 'WP_DEBUG_DISPLAY', false );
//SET PHP INI DISPLAY ERROR FALSE
@ini_set( 'display_errors', 0 );

Please find the video that will help you to edit wp-config.php and add the above code: https://www.youtube.com/watch?v=3SDPTafEM8o

Please share the admin login details and FTP details in the secure note so that we can debug it properly.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.