Title: PHP 8 causes Error 500 with call_user_func_array() and wpb_hook_javascript
Last modified: February 11, 2023

---

# PHP 8 causes Error 500 with call_user_func_array() and wpb_hook_javascript

 *  Resolved [rfmf](https://wordpress.org/support/users/rfmf/)
 * (@rfmf)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/php-8-causes-error-500-with-call_user_func_array-and-wpb_hook_javascript/)
 * Hello,
 * so, i searched for a solution (e.g. increased memory) but could not find anything
   that worked unfortunately. 
   My WordPress 6.1.1 + Elementor page works good with
   PHP 7.4 (no errors in log) but causes an WSOD Error 500 as soon as i switch to
   PHP 8.0 or higher. I deactivated ALL plugins and used the twenty-twenty-three
   theme. Also cleared/deleted old tables with a plugin. WP and plugins are up to
   date. I put define(‘WP_MEMORY_LIMIT’, ‘256M’); in my wp-config as well. Error
   Log gives me one line :
 * “PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback,
   function ‘wpb_hook_javascript’ not found or invalid function name in “[…]/wp-
   includes/class-wp-hook.php on line 308”
 * Line 308 says: 
   $value = call_user_func_array( $the_[‘function’], $args );
 * Since i deactivated everything i have no idea what to do. It seems like an internal
   WordPress problem with PHP 8, like some code that became invalid with the new
   version? Also wpb_hook_javascript seems quite generic, so i cant deduce who calls
   it. I am not a programmer though.
 * Maybe someone can tell me what to look for. Thank you!

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Moderator [threadi](https://wordpress.org/support/users/threadi/)
 * (@threadi)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/php-8-causes-error-500-with-call_user_func_array-and-wpb_hook_javascript/#post-16461921)
 * _wpb\_hook\_javascript _is not a feature of WordPress. It must come from a plugin
   or theme. Since you already disabled the plugins, did you ever change the theme?
   If it works after a theme change, the theme you used before is to blame for the
   error.
 *  [mrtom414](https://wordpress.org/support/users/mrtom414/)
 * (@mrtom414)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/php-8-causes-error-500-with-call_user_func_array-and-wpb_hook_javascript/#post-16463645)
 * Call back functions in php are used to name a function that will be called when
   an event takes place. Twenty twenty three themes is a new animal because it doesn’t
   include any default php files. There is no functions.php or index.php in this
   theme. If you are running a older version of wordpress this theme might not work.
   The index.php was removed as a required file in version 6.0.
 * If you added a functions.php file I would start looking there. Also, look in 
   your php error log to see if it display any additional information. If you disabled
   all plugins, I can’t really think of any where else to look. If you copied your
   functions.php file into the theme try removing it. Other than plugins and the
   functions.php files. This theme only uses the wordpress core files.
    -  This reply was modified 3 years, 3 months ago by [mrtom414](https://wordpress.org/support/users/mrtom414/).
 *  Thread Starter [rfmf](https://wordpress.org/support/users/rfmf/)
 * (@rfmf)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/php-8-causes-error-500-with-call_user_func_array-and-wpb_hook_javascript/#post-16477181)
 * Thank you for your suggestions, i appreciate it! I’m really busy right now, so
   I will look into it at the beginning of next week and report back. 
   [@mrtom414](https://wordpress.org/support/users/mrtom414/)
   I really just used the WordPress theme in this current case and never before.
   It was installed unused. I started with Hello Elementor (child) and stuck to 
   it, since then.
 *  Thread Starter [rfmf](https://wordpress.org/support/users/rfmf/)
 * (@rfmf)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/php-8-causes-error-500-with-call_user_func_array-and-wpb_hook_javascript/#post-16488713)
 * As [@mrtom414](https://wordpress.org/support/users/mrtom414/) suggested it was
   the functions.php of my child theme. I found an old function i added some years
   ago to test something and forgot about… Thank you for your time!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘PHP 8 causes Error 500 with call_user_func_array() and wpb_hook_javascript’
is closed to new replies.

## Tags

 * [call_user_func_array](https://wordpress.org/support/topic-tag/call_user_func_array/)
 * [error 500](https://wordpress.org/support/topic-tag/error-500/)
 * [hook](https://wordpress.org/support/topic-tag/hook/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [PHP 8.0](https://wordpress.org/support/topic-tag/php-8-0/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 3 participants
 * Last reply from: [rfmf](https://wordpress.org/support/users/rfmf/)
 * Last activity: [3 years, 3 months ago](https://wordpress.org/support/topic/php-8-causes-error-500-with-call_user_func_array-and-wpb_hook_javascript/#post-16488713)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
